68 Commits

Author SHA1 Message Date
Dylan K. Taylor
445a67954d Merge changes from master 2017-08-22 14:13:31 +01:00
Dylan K. Taylor
876659cc73 Item factory refactor and added capability to register custom items 2017-08-21 17:49:26 +01:00
Dylan K. Taylor
604d11a8fd import cleanup and fixed an inspection 2017-08-21 17:39:02 +01:00
Dylan K. Taylor
456ddd3fb3 Removed obsolete parameters from Entity->attack() and Entity->heal() 2017-08-21 13:25:11 +01:00
Dylan K. Taylor
1f70a7830e Branch merge 2017-08-20 21:07:19 +01:00
Dylan K. Taylor
02f42eba48 Move block registration to its own class 2017-08-20 18:05:01 +01:00
Dylan K. Taylor
da83b879c0 Major performance improvement to explosions
These changes produce about 3x performance improvements. Some numbers
from my machine (i7-7700k @ 4.5GHz) with TNT:
- before changes: 35ms
- after changes: 11ms

in powersave mode (0.9GHz):
- before changes: 170ms
- after changes: 60ms
2017-08-20 16:12:30 +01:00
Dylan K. Taylor
cd02f1e4be Minor performance improvement to explosions
This improves calculation time by 20-25% per explosion on flat terrain.
2017-08-20 13:28:31 +01:00
Dylan K. Taylor
eeedcf7332 Refactor Block->getResistance() -> Block->getBlastResistance() and added some documentation 2017-08-20 13:25:43 +01:00
Dylan K. Taylor
e5e76d4c93 Merge branch 'master' into mcpe-1.2 2017-08-18 18:39:39 +01:00
Dylan K. Taylor
d8f0dd6db8 Changed Block->getDrops() to return Item[] 2017-08-18 11:21:33 +01:00
Dylan K. Taylor
9be1b929a5 Added PhpDoc for packet field types and changed float x,y,z to Vector3 2017-08-13 20:02:07 +01:00
Dylan K. Taylor
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
Dylan K. Taylor
2a7b736f18 Heap of bugfixes, cleanup and PHP 7 upgrades 2017-07-13 19:18:56 +01:00
Dylan K. Taylor
0f79b19fdc Removed masks for Y coordinates, fixed bugs related to out-of-bounds coordinates, fixed #914 (#915) 2017-06-21 10:55:38 +01:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
50f7d04044 Import cleanup 2017-05-07 16:55:10 +01:00
Dylan K. Taylor
13fd8b681e Added some sounds, fixed DestroyBlockParticle wrong particles for blocks with different meta values 2017-05-04 16:50:13 +01:00
Dylan K. Taylor
f3ab45e7d5 Merged in 1.0.6 changes, added autogenerated data for 1.1.0.3 (doesn't work yet) and deliberately made the same merge error as Mojang 2017-04-14 13:00:43 +01:00
Dylan K. Taylor
56990eb28b MCPE protocol gets its own namespace 2017-03-08 20:28:39 +00:00
Dylan K. Taylor
c21197ef17 Removed entanglement between chunks and providers. WARNING: BREAKING API CHANGES.
- All entity and tile constructors now require a \pocketmine\level\Level instead of a \pocketmine\level\format\Chunk.
- Chunk->getProvider() and Chunk->setProvider() have been removed.
- Chunk::__construct() has had the $provider parameter removed.
- Chunk->unload() has had the unused $save parameter removed.
- ChunkEvents now take a Level parameter instead of going through the Chunk

API bump to 3.0.0-ALPHA4
2017-02-21 17:08:45 +00:00
Dylan K. Taylor
9004417456 Fixed file headers (#255) 2017-01-13 16:57:05 +00:00
Dylan K. Taylor
2930cf80b4 Merge branch 'master' into mcpe-1.0 2016-12-16 10:29:58 +00:00
Dylan K. Taylor
5e6d452678 Fix TNT flashing, add explosion particles and add DATA_FUSE_LENGTH entity data constant 2016-12-09 17:20:07 +00:00
Dylan K. Taylor
35b3259053 Fix explosions over 128 do not damage blocks 2016-12-02 00:01:38 +00:00
SOF3
6fc435da0e
Imports rearrangement 2016-10-03 00:43:46 +08:00
Shoghi Cervantes
3ffdb8e552 Removed @deprecated classes, methods and properties, added some type hints 2015-09-12 17:10:11 +02:00
Shoghi Cervantes
7f8b39a63c Renamed NBT tags to have Tag in the name 2015-08-23 00:25:29 +02:00
Shoghi Cervantes
31ef7721b1 Removed network channels, bumped protocol 2015-08-12 14:59:48 +02:00
Shoghi Cervantes
3e2cce3c2c use cleanup 2015-08-07 21:26:24 +02:00
Shoghi Cervantes
26c9eed82e Added all block hardness 2015-07-27 20:31:55 +02:00
Shoghi Cervantes
f7ec1de0fd
Players now have entity id 0 2015-06-19 14:40:05 +02:00
Shoghi Cervantes
f91a3a2666
Fixed invalid fix for block updates that corrupted state 2015-05-23 22:47:46 +02:00
Yosshi999
d429992f5b
Fix Fallable not dropping after explosion, Fixes #2735, Fixes #2806.
Signed-off-by: Michael Yoo <michael@yoo.id.au>
2015-05-23 22:36:23 +09:30
Shoghi Cervantes
7753b1d8be
Fixed items (and other entities) vibrating, bad offsets in tile calculation 2015-05-19 21:29:30 +02:00
Shoghi Cervantes
840690d801 Replaced old deprecated calls 2015-05-18 15:52:31 +02:00
Shoghi Cervantes
b1edfd7631 Improved Falling blocks physics, entity kill, chunk unserialize, fixed flat generator color, fixed nbt tags __toString(), fixed explosion offsets, fixed increased player interaction range in creative 2015-05-13 12:18:59 +02:00
Shoghi Cervantes
9ec609d025
Improved Player flight detection after setMotion(), other method improvement 2015-05-03 13:42:54 +02:00
Shoghi Cervantes
0b176b3fe0 Implemented Channeled packet sending 2015-04-14 18:24:40 +02:00
Shoghi Cervantes
d34499e67b Revert "Implemented proportional armor modifier, applied armor in other damage types and consume armor when player is damaged" 2015-03-18 17:26:06 +01:00
PEMapModder
8aa8ae5094 Implemented proportional armor modifier, applied armor in other damage types and consume armor when player is damaged 2015-03-17 20:04:59 +08:00
Shoghi Cervantes
074c8b876d
Cleaned up code 2015-01-03 16:07:49 +01:00
Shoghi Cervantes
04ecbd1a76 Level optimization, added new chunk/block hashes 2014-12-09 14:55:21 +01:00
Shoghi Cervantes
a4735eaf76 Replaced some instanceof to null checks 2014-12-09 02:22:18 +01:00
Shoghi Cervantes
8601405a88 Fixed CPU leak 2014-10-31 21:07:00 +01:00
Shoghi Cervantes
57d1847c50 Updated to receive new optimizations 2014-10-30 16:02:48 +01:00
Shoghi Cervantes
8a768cea33 EntityDamageEvent and children now only fire if the attack is possible, moved event trigger to Entity->attack() 2014-10-29 16:02:40 +01:00
Shoghi Cervantes
78f8d0280d Removed unused imports 2014-10-29 01:14:09 +01:00
Shoghi Cervantes
34ae760def New way to spawn entities/tiles using a global register table, allow overriding default entity/tile classes via classes 2014-10-28 13:09:27 +01:00
Shoghi Cervantes
350cee3d41 Added Event allocation pool, updated SPL with Class::onClassLoaded() 2014-10-28 10:47:40 +01:00