Dylan K. Taylor
d80f65ae7c
BedrockWorldData: do not load worlds with a newer NetworkVersion than we support
...
often, protocol updates are done without consideration for the current world format version. We don't want to require the world support to be updated at the same time, since this might delay updates.
2023-05-01 17:53:08 +01:00
Dylan K. Taylor
096daef0d0
World: added setDisplayName()
...
this is an obvious use case, and I'm not really sure why it wasn't supported sooner.
2023-05-01 16:29:07 +01:00
Dylan K. Taylor
29694c19af
BlockStateUpgradeSchemaUtils: Use independent suffixes for each property mapping list
2023-05-01 14:46:30 +01:00
Dylan K. Taylor
b3e94ef1dc
Chunk: update documentation
2023-05-01 14:46:30 +01:00
kenzeve
17fe894229
TypeConverter: fixed crash on unknown blockitems ( #5729 )
...
morton2d_encode is 64-bit function when NBT int tag is 32-bit only, resulting in crash
2023-04-30 12:11:07 +01:00
Dylan K. Taylor
728e0bc869
tools/generate-blockstate-upgrade-schema: allow multi-ID remaps to be processed as regular states if their ID didn't change
...
this allows remappedStates to only deal with stuff that has a different ID, which reduced the size of the 1.12 -> 1.13 schema quite nicely.
2023-04-28 20:58:18 +01:00
Dylan K. Taylor
a1d44de487
Added support for compressing blockstate remaps using copiedState
...
this significantly reduces the size of schemas when state remaps are used (see pmmp/BedrockBlockUpgradeSchema@85b83b360e ).
in addition, this will likely offer a substantial performance and memory saving when walls get flattened, which will eventually happen.
2023-04-28 20:35:37 +01:00
Dylan K. Taylor
263e1e9950
Fixed bogus test expectations
2023-04-28 20:05:51 +01:00
Dylan K. Taylor
2121152b76
Fix CS
2023-04-28 20:03:53 +01:00
Dylan K. Taylor
a1cd1d7433
...
2023-04-28 19:35:03 +01:00
Dylan K. Taylor
04aabaee5e
Fix CS
2023-04-28 19:31:08 +01:00
Dylan K. Taylor
75410a5412
BlockStateUpgradeSchemaUtils: sort data before emitting JSON
...
this makes it easier to see what's changing, as well as making the order stable across multiple regenerations.
2023-04-28 19:31:00 +01:00
Dylan K. Taylor
e2108557ab
BlockStateUpgrader: make sure the returned state always has an updated version ID
...
PM itself doesn't require this, but it's useful for tools to know whether to upgrade the schema again (e.g. in testing scenarios).
2023-04-28 17:26:19 +01:00
Dylan K. Taylor
ff8301b86c
BlockStateData: fixed outdated version ID
2023-04-28 17:23:32 +01:00
Dylan K. Taylor
869c836e2d
BlockStateUpgradeSchemaUtils: ensure that remapped values are generated in a consistent order
...
this uses lexical order, which isn't ideal for numeric values (1, 10, 2, etc), but it's good enough to ensure that the order is stable.
2023-04-28 17:12:52 +01:00
Dylan K. Taylor
a8dec1adb1
PM5-specific changes for 1.19.80
2023-04-26 23:30:56 +01:00
Dylan K. Taylor
0dca85af44
Merge branch 'minor-next' into major-next
2023-04-26 23:28:27 +01:00
Dylan K. Taylor
4def4d52d9
Merge branch 'stable' into minor-next
2023-04-26 23:22:00 +01:00
Dylan K. Taylor
1d10107024
4.20.1 is next
2023-04-26 23:15:38 +01:00
Dylan K. Taylor
54ae4d0ea2
Release 4.20.0
4.20.0
2023-04-26 23:15:34 +01:00
Dylan K. Taylor
0d21e591d1
Support sign editing UI in 1.19.80, with APIs to allow plugins to use it
...
this doesn't support editing the rear side of a sign, since the 1.12 format doesn't allow us to represent the rear text, and it would necessitate API breaks to support anyway.
However, we can quite trivially support APIs for the sign GUI, which plugins can use to enable editing signs. PocketMine-MP doesn't currently permit this, since it's currently an experimental feature in 1.20, but plugins can simply use Player->openSignEditor() to mimic it.
This is, however, a byproduct of the fact that APIs needed to be added in order to facilitate the use of OpenSignPacket in 1.19.80.
2023-04-26 22:55:05 +01:00
Dylan K. Taylor
408616723c
Changes for 1.19.80
2023-04-26 22:52:02 +01:00
Dylan K. Taylor
9bfcd39f2a
World: improve type info for getTickingChunks()
2023-04-26 17:06:52 +01:00
Dylan K. Taylor
8102616ff4
Added ticking chunk count to /status
...
closes #5716
2023-04-26 17:05:31 +01:00
Dylan K. Taylor
b162d688a3
CI: use php-cs-fixer 3.16
2023-04-26 16:05:06 +01:00
Dylan K. Taylor
eb130f2906
Move primary version to PHP 8.1
...
8.0 is still supported for now, but won't be updated any longer.
2023-04-26 16:03:33 +01:00
Dylan K. Taylor
3b09c3a48a
actions: updated setup-php-action to pmmp/setup-php-action@c7fb29d835
2023-04-26 14:40:39 +01:00
Dylan K. Taylor
87781cff4d
Update GitHub Actions PHP versions
2023-04-26 14:38:40 +01:00
Dylan K. Taylor
db0cf4bb5a
Update composer dependencies
2023-04-26 14:35:05 +01:00
Dylan K. Taylor
a0346fb6d3
Merge branch 'minor-next' into major-next
2023-04-26 14:29:32 +01:00
Dylan K. Taylor
eb4679fefd
Merge remote-tracking branch 'origin/stable' into minor-next
2023-04-26 14:28:29 +01:00
Dylan K. Taylor
a4f2b99ed5
InGamePacketHandler: queue slots for syncing if they appear in requestChangedSlots
...
this is essentially a prediction without the actual predicted item. We have to sync these regardless of what happens.
fixes #5708
2023-04-24 14:06:29 +01:00
Dylan K. Taylor
3ecc980bc4
ÂInventoryManagerEntry: fixed incorrect PHPDoc type
2023-04-24 13:42:11 +01:00
Dylan K. Taylor
107b56154b
ItemStackRequestExecutor: fixed stonecutter recipes
...
this uses the same dodgy hack used by CraftingTransaction, which assumes that getResultsFor() does not care about the crafting inputs.
While this is currently OK, since none of the currently-implemented recipes care about inputs anyway, it will become a problem when we implement shulker box recipes, so this needs to be addressed.
However, it can't be addressed without BC breaks, so this will have to be dealt with in PM5.
closes #5715
2023-04-24 13:35:00 +01:00
Dylan K. Taylor
f86fde064d
CraftingManager: fixed uninitialized field
...
I'm having deja vu about this ...
2023-04-24 12:34:34 +01:00
Dylan K. Taylor
edcaeef831
VanillaBlocks: reduce width of element block registration
2023-04-21 21:33:45 +01:00
Dylan K. Taylor
d4ca566fd0
Move block permutation generation into Block
...
this allows sealing off a whole bunch of internal APIs.
2023-04-21 20:38:28 +01:00
Dylan K. Taylor
6c0ad9589b
Block: rename isSameType() to hasSameTypeId()
...
this should remove any ambiguity about its behaviour.
2023-04-21 20:25:21 +01:00
Dylan K. Taylor
84a16ce69a
HandlerList: fixed crash on getting unused priority
...
these sub-arrays are no longer allocated if no handlers are registered.
fixes #5713
2023-04-21 16:19:15 +01:00
Dylan K. Taylor
d06d3bc871
4.19.4 is next
2023-04-21 15:53:05 +01:00
Dylan K. Taylor
11e34b3e5c
Release 4.19.3
4.19.3
2023-04-21 15:53:02 +01:00
Dylan K. Taylor
f9318bf286
TimingsHandler: stop throwing exceptions when timers aren't stopped in the right order
...
this is usually because of an uncaught exception interacting with a try...finally block.
This will normally result in a crash anyway, and we don't want to obscure the real error.
2023-04-21 15:38:11 +01:00
Dylan K. Taylor
769be8e140
Fix CSÂ
2023-04-20 00:18:32 +01:00
Dylan K. Taylor
c878bd8289
Merge remote-tracking branch 'origin/minor-next' into major-next
2023-04-20 00:18:19 +01:00
Dylan K. Taylor
71b78b02d3
Merge remote-tracking branch 'origin/stable' into minor-next
2023-04-19 23:57:26 +01:00
Dylan K. Taylor
4147d0dc75
tools/generate-blockstate-upgrade-schema: give better errors when a weird new blockstate version is found
2023-04-19 16:43:29 +01:00
Dylan K. Taylor
674b65f789
Item: optimise serializeCompoundTag() a little
2023-04-18 16:18:34 +01:00
Dylan K. Taylor
a77fc8109f
TypeConverter: avoid repeated calls to getId() and getMeta()
2023-04-18 15:02:52 +01:00
Dylan K. Taylor
6102740ee3
TypeConverter: use a less slow hack to restore meta values on items sent by the client
...
this isn't even really needed anymore, since we don't decode items from the client since 4.18.
However, this may still be useful for tools.
2023-04-18 15:00:34 +01:00
Dylan K. Taylor
40168a457e
TypeConverter: fixed coreItemStackToNet() causing item NBT to be prepared twice
...
hasNamedTag() calls getNamedTag(), which calls serializeCompoundTag(), which writes the item's properties into the given NBT tag.
2023-04-18 14:43:25 +01:00