Dylan K. Taylor
1c689b10b9
ItemSerializer: fixed item NBT being discarded
...
I'm still not sure on the wisdom of allowing NBT usage in here ...
2022-06-23 21:29:52 +01:00
Dylan K. Taylor
82f9a25d88
Fix PHPStan
2022-06-23 21:24:09 +01:00
Dylan K. Taylor
8822bdbefa
Fix CS
2022-06-23 21:22:52 +01:00
Dylan K. Taylor
21cf3813be
Add extra interfaces to make it easier to get at the actual blockstate serializer/deserializer
...
this still is a pain the ass, but it's much less so than before.
2022-06-23 20:01:19 +01:00
Dylan K. Taylor
adf8a61814
BlockStateToBlockObjectDeserializer: make map() public
...
this allows plugins to implement their own blocks using this deserializer.
2022-06-23 19:40:11 +01:00
Dylan K. Taylor
6964012464
fix a bunch of bugs
2022-06-23 19:34:08 +01:00
Dylan K. Taylor
5ed75731f2
First (untested) look at hooking all the itemstack serializer/deserializer stuff together
...
this should address #5063 and related issues, if it works correctly.
2022-06-23 19:02:16 +01:00
Dylan K. Taylor
d8bba6ed3d
git add -p bites again
2022-06-23 16:55:50 +01:00
Dylan K. Taylor
0da174842e
Fix build
2022-06-23 16:46:09 +01:00
Dylan K. Taylor
1533fcf8f6
Separate block legacy data upgrading from block deserialization
...
this commit provides a central place where all block data can go to be upgraded to the latest version (currently 1.19), irrespective of how old it is.
Previously I had issues during debugging, because it wasn't possible to just upgrade a block without deserializing it into a Block object, which isn't currently supported for many blocks.
This commit solves that problem by separating the upgrading from the deserialization.
2022-06-23 16:45:02 +01:00
Dylan K. Taylor
301b0aba82
Allow Item (de)serializer to accept dynamic BlockState(De)Serializer
2022-06-08 16:22:35 +01:00
Dylan K. Taylor
4aa1a3da8b
Moving more stuff around
2022-06-08 15:57:02 +01:00
Dylan K. Taylor
680615eed8
Namespace rename
2022-06-08 15:54:45 +01:00
Dylan K. Taylor
831738b29c
Added BedrockItemUpgradeSchema dependency
2022-06-08 14:53:58 +01:00
Dylan K. Taylor
e956cfed1c
Branch-specific 1.19.0 stuff
2022-06-07 20:14:00 +01:00
Dylan K. Taylor
cf7d42b3ea
Fix CS according to new rules
2022-06-07 20:02:24 +01:00
Dylan K. Taylor
1ff69136a3
Merge branch 'next-major' into modern-world-support
2022-06-07 20:01:40 +01:00
Dylan K. Taylor
86e7ae341f
ItemSerializer: Prohibit serializing recipe input wildcards
2022-06-06 20:48:44 +01:00
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00
Dylan K. Taylor
776b8d2f95
Harden BlockStateDeserializer further against bugs
2022-05-25 21:56:17 +01:00
Dylan K. Taylor
81b51c0791
fixing special block serialization
2022-05-24 21:29:20 +01:00
Dylan K. Taylor
d8dc32ec4b
PhpStorm sucks
...
I'm very sure I enabled 'Ensure every file ends with a line break' ...
2022-05-24 15:22:23 +01:00
Dylan K. Taylor
81eafde074
Hacks for banners and coral fans
2022-05-24 15:07:38 +01:00
Dylan K. Taylor
5ce5e1d2b0
Throw proper exceptions for serialize/deserialize failures
...
this allows them to be caught and properly reported in tests.
2022-05-24 14:46:18 +01:00
Dylan K. Taylor
901a51a9dd
Added serialize/deserialize support for stonecutter
2022-05-24 14:31:40 +01:00
Dylan K. Taylor
68491be847
Merge branch 'next-major' into modern-world-support
2022-05-20 11:21:35 +01:00
Dylan K. Taylor
343a12626e
Modernize private property declarations in src/data
2022-05-17 20:35:59 +01:00
Dylan K. Taylor
2f2ffe0aa4
fix phpstan
2022-05-13 21:03:49 +01:00
Dylan K. Taylor
a75bc5d537
Mojang cannot be relied on ...
2022-05-13 20:50:38 +01:00
Dylan K. Taylor
e27f80fd85
Remove unused code
2022-05-12 21:06:33 +01:00
Dylan K. Taylor
d10d660a4d
fix PHPStan
2022-05-12 16:37:50 +01:00
Dylan K. Taylor
107b0e1728
CS again, kill me
2022-05-12 16:35:12 +01:00
Dylan K. Taylor
cb97f37d13
First look at modern-spec serializer/deserializer for items
...
this is not yet used by anything
2022-05-12 16:26:38 +01:00
Dylan K. Taylor
6c92e73b46
Switch to modernized BedrockData
2022-05-12 15:30:35 +01:00
Dylan K. Taylor
43e61336cf
Support 1.18.30 worlds
2022-04-20 14:58:32 +01:00
Dylan K. Taylor
4c433fd75b
Remap invalid metadata values to zero
...
this is a bit less sophisticated than the way we do it with BlockFactory, but this shouldn't usually have any relevance anyway - it's only used for correcting bogus states.
2022-03-28 18:13:14 +01:00
Dylan K. Taylor
8bf1fb7b1d
Merge branch 'next-minor' into modern-world-support
2022-03-24 12:50:45 +00:00
Dylan K. Taylor
f25beab6cb
Use constants for compound meta values
2022-03-23 15:58:27 +00:00
Dylan K. Taylor
e98cf39b47
cs
2022-02-11 21:18:56 +00:00
Dylan K. Taylor
bc46e148df
Updated to support new tag storage format
2022-02-11 21:13:28 +00:00
Dylan K. Taylor
905eee3198
BlockStateUpgrader: do not apply backwards-incompatible schemas to blockstates already on the correct version
...
this notably led to corruption of glow_lichen and sculk_vein in 1.18.10.
2022-02-10 20:51:31 +00:00
Dylan K. Taylor
8a11ed70e3
improve reusability
2022-02-10 19:38:50 +00:00
Dylan K. Taylor
db9d769db6
fix CS #2
2022-02-10 13:49:40 +00:00
Dylan K. Taylor
0a0383d9bd
BlockStateUpgradeSchema: added isEmpty()
2022-02-10 13:03:29 +00:00
Dylan K. Taylor
1b3e50d0a3
Implement support for remappedPropertyValuesIndex schema format
2022-02-10 00:00:01 +00:00
Dylan K. Taylor
dc5ddf1c1b
make the build pass
2022-02-09 20:18:38 +00:00
Dylan K. Taylor
03cf635adc
Removed pointless array cast
2022-02-09 20:17:28 +00:00
Dylan K. Taylor
0ce3f763db
reEEEEEEEEEEEEEEEEE
2022-02-09 20:13:59 +00:00
Dylan K. Taylor
0226f5466c
Added support for upgrading states via remap (needed for end rods and all-sided-logs)
2022-02-09 20:05:20 +00:00
Dylan K. Taylor
166ffe430a
Updated for 1.18.10
2022-02-08 22:56:04 +00:00