19 Commits

Author SHA1 Message Date
Dylan K. Taylor
d0d84d4c51
New rule: explode() limit parameter must be set 2025-03-04 20:44:01 +00:00
Dries C
91ac64783f
Bedrock 1.21.60 (#6627)
Co-authored-by: Dylan K. Taylor <dktapps@pmmp.io>
2025-02-16 20:51:53 +00:00
Dylan K. Taylor
47cb04f6a6
tools: fix PHPStan 2.0 issues 2025-01-07 22:15:50 +00:00
Dylan K. Taylor
5325ecee37
Deal with a whole lot of PHPStan suppressed key casting errors
closes #6534
2024-11-25 14:30:58 +00:00
Dries C
4814db4fe7
Assemble 1.21.40 (#6471) 2024-10-25 14:21:51 +01:00
Dylan K. Taylor
f121654452
Assemble 1.21.0 2024-06-13 18:41:41 +01:00
Dylan K. Taylor
6077748caa
Changes for 1.20.80 2024-04-25 11:31:41 +01:00
Dylan K. Taylor
efd113bdc8
Integrate pmmp/BedrockProtocol@65b3d0b341 2024-02-26 17:09:09 +00:00
Dylan K. Taylor
81d5b9ba06
tools/generate-bedrock-data-from-packets: add more exception detail for unexpected block runtimeIDs 2024-01-22 18:49:06 +00:00
Dylan K. Taylor
c3bca9e172
tools/generate-bedrock-data-from-packets: fixed interpreting item metadata as blockstates when the item ID could be interpreted as a block ID
this broke crafting recipes which accepted skulls as inputs, as well as nether wart and bed recipes.
2023-09-27 12:37:26 +01:00
Dylan K. Taylor
540f088eda
tools/generate-bedrock-data-from-packets: make duplicate reporting less spammy 2023-09-01 20:51:45 +01:00
Dylan K. Taylor
ff0199cdf8
Fixed blue candle being missing from the creative inventory
this coincidentally fixes mangrove doors being tagged with unwanted blockstate runtime IDs. Their items client-side are not actually blockitems, so the client doesn't expect them to have blockstate IDs attached.
This reduces the chaos in the creative inventory slightly (for some reason the client responds to this stuff by putting random creative items in the wrong places), but the mess is still substantial and I don't know what caused the rest of it.

closes #5818

technically we shouldn't be breaking BC of internals signatures in a patch release, but it's internals, and that's an unwritten rule anyway. In any case, no one is likely to be affected.
2023-06-13 18:03:10 +01:00
Dylan K. Taylor
ed021d193d
BlockTranslator: cut memory usage in half
this was achieved by storing binary representations of the blockstates, rather than the original BlockStateData.

Due to the insane object:data ratio of Tag objects (40:1 for ByteTag for example), modestly sized NBT can explode in memory footprint. This has been previously seen with the absurd 25 MB footprint on file load.
Previously, I attempted to mitigate this by deduplicating tag objects, but this was mitigating a symptom rather than addressing the cause.

We don't actually need to keep the NBT around in memory, since we don't actually use it for anything other than matching blockstates. In this case, we can allow the code to be possibly a little slower, since the lookup is anyway slow and the result will be cached.
In fact, using encoded ordered states as hash keys significantly improves the speed of lookups for stuff like walls, which have many thousands of states.

We keep around generateStateData(), since it's still possible we may need the BlockStateData associated, and it can be easily reconstructed from the binary-encoded representation in BlockStateDictionaryEntry.
2023-05-03 23:11:00 +01:00
Dylan K. Taylor
32e6fdd95a
Rename RuntimeBlockMapping -> BlockTranslator 2023-05-03 22:18:27 +01:00
Dylan K. Taylor
a8dec1adb1
PM5-specific changes for 1.19.80 2023-04-26 23:30:56 +01:00
Dylan K. Taylor
777b4d6ac3
PM5-specific updates for 1.19.70 2023-03-14 18:50:04 +00:00
Dylan K. Taylor
7c95a65ade
... 2023-03-08 23:14:11 +00:00
Dylan K. Taylor
2b88b215bf
CS cleanup 2023-03-08 23:10:11 +00:00
Dylan K. Taylor
54c19fd662
Open-source script that generates recipes and other goodies for BedrockData
this script has been lurking in my workspace for years, waiting to be cleaned up and open-sourced.
2023-03-08 23:04:09 +00:00