Issue description
Java uses 0x08 for check-decay and 0x04 for no-decay. Bedrock uses the opposite.
PM currently implements the Java way, which is problematic when importing worlds from vanilla, since it means that player-placed leaves will decay on world load.
This is further complicated by the inability to distinguish between a converted Java world and a converted Bedrock world in PM 4.0, since this makes it impossible to determine how the states should be decoded.
This problem was discovered during blockstates migration.
Several possible solutions come to mind:
- Leave it as-is; this means that only imported Bedrock worlds will be influenced by the bug, but also means that the same problem will occur if the world is exported from PM to a Bedrock client.
- Fix it to Bedrock standard; this fixes problems with imported Bedrock worlds, but transfers the player-placed leaf decay problem to any Java or PM-based world, which is almost all of them
- Mark all leaves as no-decay when loading from metadata. This would result in some annoying artifacts when destroying trees.
There doesn't seem to be any good solution to this problem.
Steps to reproduce the issue
- Place some leaves in a PM world
- Export the world to Bedrock
- Notice the leaves decay on the client
OS and versions
- PocketMine-MP: 4.0.8
- Game version: 1.12.0
Issue description
Java uses 0x08 for check-decay and 0x04 for no-decay. Bedrock uses the opposite.
PM currently implements the Java way, which is problematic when importing worlds from vanilla, since it means that player-placed leaves will decay on world load.
This is further complicated by the inability to distinguish between a converted Java world and a converted Bedrock world in PM 4.0, since this makes it impossible to determine how the states should be decoded.
This problem was discovered during blockstates migration.
Several possible solutions come to mind:
There doesn't seem to be any good solution to this problem.
Steps to reproduce the issue
OS and versions