360 Commits

Author SHA1 Message Date
Dylan K. Taylor
ad67fb7291
BlockStateUpgradeSchemaModelBlockRemap: added missing @required tag 2023-06-24 16:22:29 +01:00
ace
bccda4fe44
Implement Piglin Head (#5839) 2023-06-19 12:07:49 +01:00
Dylan K. Taylor
8f48f8a596
Added missing cherry door item, closes #5817 2023-06-13 18:18:13 +01:00
Dylan K. Taylor
288ebfa08a
Fixed a bunch of item IDs being missing
these items were all pretending to be blockitems when I dumped data, and I wasn't aware that they'd been omitted.
2023-06-13 18:15:47 +01:00
Dylan K. Taylor
a3046eb6fa
Merge branch 'stable' into minor-next 2023-06-13 18:06:06 +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
1533dc4e56
Added cherry leaves 2023-06-10 13:21:21 +01:00
Dylan K. Taylor
3800c0480f
Group leaves (de)serializers together 2023-06-09 19:19:29 +01:00
Dylan K. Taylor
0f8e61eda4
Implemented new cherry-wood blocks 2023-06-09 18:04:52 +01:00
Dylan K. Taylor
0eb5f9b684
Fixed missing ItemTypeNames (forgot to regenerate from 1.20) 2023-06-09 17:59:11 +01:00
Dylan K. Taylor
0f9283fda1
Reduce chaos in blockstate (de)serializers wrt. wooden blocks
these started to get flattened in 1.19, and rather than dump them in random places in the main function I made a new method, creating placement inconsistencies.
2023-06-09 17:47:06 +01:00
Dylan K. Taylor
833f9401f9
Merge branch 'stable' into minor-next 2023-06-07 22:03:34 +01:00
Dylan K. Taylor
73ee94b62c
Fixed BlockStateData::CURRENT_VERSION 2023-06-07 21:58:21 +01:00
Dylan K. Taylor
9a67e3d660
PM5-specific changes for 1.20.0.23 beta 2023-06-07 21:08:41 +01:00
IvanCraft623
6d7f44d8fe
Implement glow lichen (#5401) 2023-06-04 16:04:08 +01:00
Dylan K. Taylor
4340c26029
RuntimeDataSizeCalculator: Tidy up junk comments 2023-06-02 16:37:08 +01:00
Dylan K. Taylor
f5a1a0c9cb
ÂInsert PM data version into blockstates, chunks, entities, tiles and level.dat
this information will allow us to correct for any bugs introduced by past versions.

however, we still need to propagate this information to permit actually using it when loading data.
2023-05-29 16:32:24 +01:00
Dylan K. Taylor
b8ba2d03ba
Added new note instruments up to 1.19
1.20 adds extra ones for each type of mob head, but we're not supporting 1.20 yet.
2023-05-26 16:58:06 +01:00
Dylan K. Taylor
fddab29e87
Move mob head and note instrument save IDs into pocketmine\data\bedrock
to be consistent, these shouldn't be exposed in the API like this...
I'm not very happy with the whole 'type ID map' paradigm (particularly its lack of static analysis guarantees), but the most important thing right now is to get this stuff out of the API so that plugin devs don't try and abuse it. We're not going to change the whole system days before PM5 release.
2023-05-26 15:47:12 +01:00
Dylan K. Taylor
bdb0ed0701
Consistently use 'mob head' terminology in the API
previously, we were sometimes using 'mob head' and other times 'skull', sometimes even within the same file.
2023-05-26 15:08:00 +01:00
Dylan K. Taylor
fdb724c646
ItemSerializer: change exception type 2023-05-20 18:58:59 +01:00
Dylan K. Taylor
3109a179db
... 2023-05-20 18:56:28 +01:00
Dylan K. Taylor
5afeeb8f89
Remove nonsensical code from block and item serializers
At the time when I wrote this code, I was still in the head space of the kind of ID hijacking that PM4 plugins do to override built-in blocks.

However, this kind of internal ID reuse makes no sense in PM5, since said IDs are only used in the core itself at runtime to identify types and states.

Even if we were to allow overriding block deserializers, overriding serializers makes no sense whatsoever, since the original block would continue to exist and be accessible.
There is a case to be made to allow overriding the deserializer, but not for the serializer.
2023-05-20 18:55:36 +01:00
Dylan K. Taylor
9621836e36
Clean up confusing mess around block and item overriding
right now, I don't see an obvious reason to do this. If it turns out I was wrong later on, we can add functionality back, but we can't remove functionality after release.
2023-05-17 15:21:49 +01:00
IvanCraft623
30f1d3e016
Fix code style (#5740) 2023-05-10 13:41:25 +01:00
Dylan K. Taylor
7b1a1e5a18
BlockStateToObjectDeserializer: remove redundant helper 2023-05-08 22:16:55 +01:00
Dylan K. Taylor
1b452f3a88
BlockStateToObjectDeserializer: make flat colour block handling less repetetive 2023-05-08 21:38:58 +01:00
ipad54
fa719f37d5
Implement Cave Vines & Glow Berries (#5424) 2023-05-08 19:24:23 +01:00
Dylan K. Taylor
6f0eb019d2
ItemIdMetaUpgrader: added some auxiliary methods 2023-05-07 19:28:07 +01:00
Dylan K. Taylor
299ff5d912
Register mangrove boat item 2023-05-04 16:39:23 +01:00
Dylan K. Taylor
6beb80b8fe
Fixed usages of BlockDataUpgrader which weren't accounting for thrown exceptions 2023-05-02 17:13:31 +01:00
Dylan K. Taylor
5fcf5e0c40
LevelDB: log more stuff, stop bailing on recoverable errors 2023-05-02 16:46:45 +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
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
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
0818388bd5
Allow remapped oldState and newState to accept null, to make it easier for third-party tools to use the schemas
since PHP emits empty JSON objects as arrays, this makes it pretty annoying to work with the schemas in other languages. However, nullability is something most languages understand pretty easily.

This should continue to support old schemas.
2023-03-25 19:41:40 +00:00
Dylan K. Taylor
777b4d6ac3
PM5-specific updates for 1.19.70 2023-03-14 18:50:04 +00:00
Dylan K. Taylor
a123194368
BlockStateData: added getVersionAsString() 2023-03-13 16:14:19 +00:00
Dylan K. Taylor
5eeb63f64b
always the CS ... 2023-03-04 15:52:57 +00:00
Dylan K. Taylor
b9d62de29d
Pack wall connections into 7 bits for runtime data encoding 2023-03-04 15:47:34 +00:00
Dylan K. Taylor
7608d5f04e
Use BedrockDataFiles in more places 2023-02-23 22:03:35 +00:00
Dylan K. Taylor
c82b43a586
Merge branch 'next-minor' into next-major 2023-02-23 22:00:14 +00:00
Dylan K. Taylor
f704bfb63a
Use BedrockData 2.0.0 2023-02-23 21:52:17 +00:00