9778 Commits

Author SHA1 Message Date
Dylan K. Taylor
cd8645ff20 Removed PalettedBlockArray stub
the SubChunkConverter stub was accidentally removed in dd914e07523c7038c868c9969d88fdd97b00b7cf, but no great harm done ...
2019-05-18 15:15:20 +01:00
Dylan K. Taylor
6de0b48c1f PacketBatch: Always encode packets freshly, never reuse buffers
this causes bugs when a packet is modified during events and then re-sent to a player. Since we can't control this, we can't allow this kind of buffer reuse.

The only notable case where this will cause loss of performance is when broadcasting a series of packet(s) which accumulate to less than 256 bytes, which is reasonably cheap to encode anyway.
In addition, removing this caching is one roadblock to moving this serialization to native code, which will make it vastly faster.
2019-05-17 18:04:51 +01:00
Dylan K. Taylor
64f7f558a4 Merge branch 'stable'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/entity/Human.php
2019-05-17 17:43:30 +01:00
Dylan K. Taylor
76e5ea385b Skin: improved error checking
plugin devs should find this less of a pain in the ass now.
2019-05-17 17:40:27 +01:00
Dylan K. Taylor
0f398bbe66 LevelDB: Added conversion of legacy extradata -> 4D subchunk block layers 2019-05-17 17:15:45 +01:00
Dylan K. Taylor
f7a9da4e92 PillarRotationTrait: Allow axis shift to be defined by the includer 2019-05-16 18:02:03 +01:00
Dylan K. Taylor
dd914e0752 Block: move all legacy metadata constants into a dedicated class
this makes it easier to see what is using metadata (and makes it easier to get rid of later).
2019-05-16 16:55:44 +01:00
Dylan K. Taylor
1898db840d BlockFactory: more collapsible region things 2019-05-16 14:36:02 +01:00
Dylan K. Taylor
642c16dfe7 added some //region ... //endregion 2019-05-16 14:35:34 +01:00
Dylan K. Taylor
ff2600a0d0 Regenerated TODOs for BlockFactory and ItemFactory
also added //region and //endregion for IDE collapsibility
2019-05-16 14:20:51 +01:00
Dylan K. Taylor
5024de38b8 added more types of stone slab 2019-05-15 18:15:25 +01:00
Dylan K. Taylor
9ea684581f Merge remote-tracking branch 'origin/stable' 2019-05-13 18:17:42 +01:00
Dylan K. Taylor
fd413b512e Remove useless Dandelion class
this class is line-for-line identical to the Flower class.
2019-05-12 18:42:49 +01:00
Dylan K. Taylor
10831821be Anvil: fix wrong visibility for recalculateBoundingBox() 2019-05-12 17:58:45 +01:00
Dylan K. Taylor
85c6eb5003 Fence: cleanup some BB handling 2019-05-12 16:22:41 +01:00
Dylan K. Taylor
166d821bcf Stair: some BB handling cleanup 2019-05-12 16:22:20 +01:00
Dylan K. Taylor
d6b720b55d Wall: minor BB calculation cleanup 2019-05-12 16:21:52 +01:00
Dylan K. Taylor
a19651a8dc Painting: reduce complexity of getPaintingBB()
this makes it easier to unit-test.
2019-05-12 16:15:31 +01:00
Dylan K. Taylor
adf4639625 Painting: Clean up painful BB calculation code 2019-05-12 16:10:51 +01:00
Dylan K. Taylor
db4dac6d45 World: Remove incorrect isSolid() check for placement collision check
isSolid() != can be collided with. That's decided by the collision boxes provided, if any.
2019-05-12 16:00:38 +01:00
Dylan K. Taylor
90e6073202 Vine: Clean up awful bounding-box calculation
the logic here is deceptively simple, just obscured by a lot of really nasty code.
2019-05-12 15:58:28 +01:00
Dylan K. Taylor
41d754de5a Vine: fix bug when reading state multiple times 2019-05-12 15:03:44 +01:00
Frago9876543210
5a351d3caf Fix for Server::hasOfflinePlayerData (#2919) 2019-05-12 12:06:05 +01:00
Johnmacro
bb93d4f8de TimeCommand: Fix commands.time.query message (#2917) 2019-05-12 09:21:39 +01:00
Johnmacro
66818e178a DefaultPermissions: Fix typos in permission descriptions (#2918) 2019-05-12 09:20:45 +01:00
Dylan K. Taylor
c99846e069 Unify Item constructor style
this exposed a few more dead classes.
2019-05-11 18:24:21 +01:00
Dylan K. Taylor
51f96b195e ItemFactory: fix wrong typehint 2019-05-11 18:02:18 +01:00
Dylan K. Taylor
0bf7fd2c0d Partially revert "Separate block break-info to a separate dynamic unit"
This reverts commit 9e72bc91a2987aa43fb1d25715b5aff789b27b63.
2019-05-11 09:46:20 +01:00
Dylan K. Taylor
650e186481 Removed bad assumption that every Flowable descendent is an instant-breaking block
I'm wondering if there is even a point to Flowable at this point. Half of the blocks inheriting from it do not break instantly, or have some other modification to tool requirements.
2019-05-10 17:00:01 +01:00
Dylan K. Taylor
01ad568256 Air: use BlockBreakInfo::indestructible() 2019-05-10 16:30:14 +01:00
Dylan K. Taylor
9e72bc91a2 Separate block break-info to a separate dynamic unit 2019-05-10 16:24:59 +01:00
Dylan K. Taylor
3be5de4570 Separate WoodenTrapdoor from Trapdoor, fixed iron trapdoors being valid furnace fuel, closes #2914 for bleeding-edge 2019-05-09 19:30:18 +01:00
Dylan K. Taylor
5eb3c52a37 added PunchBlockParticle, encapsulate more network logic 2019-05-09 15:40:58 +01:00
Dylan K. Taylor
51a8c2be9d Player: Move rollback responsibility to network for interact/break block
Custom player implementations might not need rollbacks (f.e. Specter).
2019-05-09 14:54:56 +01:00
Dylan K. Taylor
ca7c23c137 Player: remove dead functions
these functions belong in the network session, and they are currently just proxies for them. In the future we might have players who don't have IPs at all depending on how they connected (for example Specter) so this stuff shouldn't be in here.
2019-05-08 19:47:25 +01:00
Dylan K. Taylor
4634baeb02 Player: don't repeat yourself 2019-05-08 19:38:57 +01:00
Dylan K. Taylor
cf73c7f5c1 Cleanup to world provider exception handling 2019-05-08 18:26:41 +01:00
Dylan K. Taylor
a51c06116a Merge branch 'stable' 2019-05-08 17:04:37 +01:00
Dylan K. Taylor
f782a478c4 Player: clarify resetTitles() documentation 2019-05-08 17:03:40 +01:00
Dylan K. Taylor
19ac0811f4 Player: remove deprecated title functions 2019-05-08 16:44:18 +01:00
Dylan K. Taylor
a331c5e13f Player: reduce SetTitlePacket creation boilerplate
it's better to encapsulate all this logic in one place so that third party developers can more easily understand this, and also to reduce the amount of crap we have in Player.
2019-05-08 16:43:05 +01:00
Dylan K. Taylor
9fbf41b9a1 Merge branch 'stable' 2019-05-08 15:41:17 +01:00
Dylan K. Taylor
c06b4830d1 Player: don't spawn entities on out-of-sync chunks on join, closes #2911 2019-05-08 15:36:54 +01:00
Dylan K. Taylor
fc90cdcc95 fix #2910 WorldManager->getLevel() missed in refactor 2019-05-08 14:05:42 +01:00
Dylan K. Taylor
cf0c0e72a9 Assume the player is online when they are, uh, assumed to be online
the checks removed here should never be hit under normal circumstances. If they were hit, they'd just conceal bugs which would cause a crash to happen later anyway.
2019-05-07 19:49:06 +01:00
Dylan K. Taylor
78bb6f4a0c Reduce complexity of chunk sending system 2019-05-07 19:26:01 +01:00
Dylan K. Taylor
51548d1a27 World: remove useless internal function
this just complicates the logic for no reason. It had a purpose once, but no longer.
2019-05-07 18:51:26 +01:00
Dylan K. Taylor
c1a483a36d move entity spawning logic back to Player 2019-05-07 18:35:04 +01:00
Dylan K. Taylor
d7a7ab5102 Move Entity despawn logic back to Player
this is not network-session specific, and different implementations will need to do this.
2019-05-07 18:01:23 +01:00
Dylan K. Taylor
66481fedeb Entity: Protect internal methods setPosition() and setPositionAndRotation()
teleport() should be used instead (or setRotation() for rotation-only changes).
2019-05-07 17:38:33 +01:00