109 Commits

Author SHA1 Message Date
Dylan K. Taylor
405e552efd
ItemTranslator: use GlobalItemDataHandlers
this ensures that plugin serializers will actually be used on the network.
2022-07-04 15:47:28 +01:00
Dylan K. Taylor
d9c61f0492
Publish script used to generate ItemTypeIds 2022-07-04 15:43:13 +01:00
Dylan K. Taylor
323c563684
Break Block's dependence on ItemFactory, and item legacy IDs
let's GOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
2022-07-02 17:29:28 +01:00
Dylan K. Taylor
7994da07be
Crafting recipe network serialization no longer depends on PM's internal legacy metadata
WOOOOOOOOOOOOOOOOOOOOOOHOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!!
2022-07-02 16:37:43 +01:00
Dylan K. Taylor
2cb722b674
Fixed durability handling (ish) 2022-06-29 15:17:16 +01:00
Dylan K. Taylor
541a624d48
ItemFactory::get() now consistently throws SavedDataLoadingException on any error, including unknown items 2022-06-27 17:14:43 +01:00
Dylan K. Taylor
55cb68e5b5
Burn meta wildcards from Item, allow more dynamic recipe inputs
this was an obstacle for getting rid of legacy item IDs.
2022-06-27 13:33:26 +01:00
Dylan K. Taylor
bc5a600d59
Added item stack serialize/deserialize methods 2022-06-26 17:02:55 +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
680615eed8
Namespace rename 2022-06-08 15:54:45 +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
c29e23b2f1
TypeConverter: port 5fd685e07d61ef670584ed11a52fd5f4b99a81a7 to modern-world-support 2022-06-06 22:13:26 +01:00
Dylan K. Taylor
57132204ec
ItemTranslator: throw only the expected exception types 2022-06-06 22:09:32 +01:00
Dylan K. Taylor
860fa719b2
ItemTranslator: Accept dynamic BlockStateDictionary instead of using singleton
this will be needed for handling protocol updates in the future
2022-06-06 21:50:43 +01:00
Dylan K. Taylor
c89f7f8e5e
TypeConverter: duct tape for crafting recipe block inputs 2022-06-06 21:47:04 +01:00
Dylan K. Taylor
13bb1c26fb
ItemTranslator now operates directly using Item, rather than using item ID/meta + ItemFactory
in almost all cases where ItemTranslator is used, an Item already exists, so it doesn't make any sense to make ItemTranslator go and create another item instance just to pass to ‰ItemSerializer.
2022-06-06 20:51:26 +01:00
Dylan K. Taylor
5fd685e07d
TypeConverter: fix crash on arbitrary out-of-bounds item IDs
I don't know why I didn't consider this fix necessary when the item meta bug was originally discovered.
2022-06-06 19:29:44 +01:00
Dylan K. Taylor
08fbf92d8d
Filter out recipes containing unknown items 2022-06-06 18:25:14 +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
ef15dc883a
Merge branch 'next-major' into modern-world-support 2022-06-01 15:34:26 +01:00
Dylan K. Taylor
3fcf6372e0
Merge branch 'stable' into next-minor 2022-06-01 15:32:37 +01:00
Dylan K. Taylor
bf199d3a74
duct tape for recipes 2022-05-27 20:40:32 +01:00
Dylan K. Taylor
2b27b8a230
fixed fucky wucky 2022-05-24 21:52:10 +01:00
Dylan K. Taylor
383be5426e
Rewrite network item serialization to use ItemSerializer 2022-05-24 21:44:57 +01:00
Dylan K. Taylor
227f28a6d2
Use VanillaItems::AIR() instead of ItemFactory 2022-05-24 15:47:27 +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
d4b7f66e15
Promote some constructors 2022-05-17 22:34:58 +01:00
Dylan K. Taylor
c0b15de504
Modernize private static property declarations 2022-05-17 21:55:16 +01:00
Dylan K. Taylor
6eac2ea7a5
Modernize private property declarations in src/network 2022-05-17 21:22:33 +01:00
ipad54
1e59679ec2
Implemented Stonecutter (#4732) 2022-05-17 16:01:03 +01:00
Dylan K. Taylor
1a598bdfd8
RuntimeBlockMapping: make constructor more useful
this allows providing more customisable data sources.
2022-05-12 21:20:28 +01:00
Dylan K. Taylor
37f0ccdb7e
fix CS 2022-04-20 14:58:57 +01:00
Dylan K. Taylor
e383f6d8f8
Merge branch 'next-major' into modern-world-support 2022-04-20 14:29:22 +01:00
Dylan K. Taylor
6b4687a36b
RuntimeBlockMapping: unseal constructor to facilitate easier testing of new versions 2022-04-20 14:00:20 +01:00
Dylan K. Taylor
63b2e7cc4f
fix CS 2022-04-15 19:25:39 +01:00
Dylan K. Taylor
c1c3475e5a
RuntimeBlockMapping: reuse the state ID for unknown blocks
this doesn't really provide any meaningful benefit, unless there are a very large number of unrecognized states
2022-04-15 19:06:56 +01:00
Dylan K. Taylor
ed95679953
Merge branch 'next-minor' into modern-world-support 2022-03-23 13:42:46 +00:00
Dylan K. Taylor
c8e1cfcbee
TypeConverter: account for possible out-of-range meta in items 2022-03-18 19:34:51 +00:00
Dylan K. Taylor
e58b3ba46c
First look at loading 1.13+ worlds 2022-02-07 03:06:59 +00:00
Dylan K. Taylor
dd3b79b142
phpstorm sucks 2022-02-07 02:50:43 +00:00
Dylan K. Taylor
863f9560b0
RuntimeBlockMapping: make fallbackStateData not useless 2022-02-07 02:49:19 +00:00
Dylan K. Taylor
f870568e62
fix RuntimeBlockMapping 2022-02-07 02:46:50 +00:00
Dylan K. Taylor
d55eed803d
make build green 2022-02-05 21:12:11 +00:00
Dylan K. Taylor
f4f4ea1483
fix CS 2022-02-01 17:44:12 +00:00
Dylan K. Taylor
979f6f3d57
Rewrite RuntimeBlockMapping to use BlockStateSerializer 2022-02-01 17:34:32 +00:00
Dylan K. Taylor
be1996752a
Replace disallowed operators in src/network/ 2022-01-20 19:11:32 +00:00
Dylan K. Taylor
889d048ca3
Make use of Utils::assumeNotFalse() in a bunch of places
I've stuck to only doing this in the places where I'm sure we should never get false back. Other places I'm less sure of (and I found more bugs along the way).
2021-12-08 19:39:04 +00:00
Dylan K. Taylor
8b73549355
Use JSON_THROW_ON_ERROR for json_encode() and json_decode() 2021-12-08 19:14:07 +00:00
Covered123
eb0cf52d81
Remove useless code (#4590) 2021-11-23 17:09:33 +00:00