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
Dylan K. Taylor
269231c228
Ban foreach(arrayWithStringKeys as k => v)
...
this is not as good as phpstan/phpstan-src#769 (e.g. array_key_first()/array_key_last() aren't covered by this, nor is array_rand()) but it does eliminate the most infuriating cases where this usually crops up.
2021-11-15 22:52:05 +00:00
Dylan K. Taylor
93a1e84ad9
TypeConverter: further simplification
2021-11-08 20:27:53 +00:00
Dylan K. Taylor
c33f97ae41
TypeConverter: clean up absurdly overcomplicated bullshit in createInventoryAction()
2021-11-08 20:18:19 +00:00
Dylan K. Taylor
45edb94607
Crafting tables now work the same way as anvils and enchanting tables
...
Removing almost all special-case logic for crafting tables.
2021-11-07 16:20:07 +00:00
Dylan K. Taylor
275f145418
BedrockData is now a Composer dependency
...
this should put a stop to people nagging me about incorrect blocks (we have a check to make sure composer dependencies are up to date).
2021-11-02 16:45:45 +00:00
Dylan K. Taylor
80b402e529
ItemTranslator: throw the proper exceptions when failing to map network IDs
2021-10-20 14:01:39 +01:00
Dylan K. Taylor
9b94a4661b
ItemTranslator: Use LegacyItemIdToStringMap instead of reading files directly
2021-10-11 22:17:40 +01:00
Dylan K. Taylor
e62794e4cf
TypeConverter: fixed PHPStan errors
2021-10-11 15:17:32 +01:00
Dylan K. Taylor
8ac16345a3
TypeConverter: account for items without properly mapped IDs
...
fixes #4459
2021-10-11 15:05:08 +01:00
Dylan K. Taylor
13178a47a5
fuck you git
2021-10-05 19:11:10 +01:00
Dylan K. Taylor
817ab88c70
Properly handle errors decoding network item NBT
...
since the NBT is now decoded immediately now, any incorrect NBT will cause exceptions to be thrown that we weren't handling, causing server crashes.
2021-10-05 19:10:55 +01:00
Dylan K. Taylor
4a787769bf
Merge branch 'stable'
2021-09-09 16:06:16 +01:00
Sensei Tarzan
1bbf739385
the function stringToLegacy gives already null useless to put a default null ( #4338 )
2021-07-31 16:54:31 +01:00
Dylan K. Taylor
1ad38d499c
Deglobalize ItemTypeDictionary usage, at least for the protocol
...
while this is a bit hacky outside of the protocol namespace, it makes it much easier to use the protocol library for alternative purposes, such as for a client or MITM proxy.
It also removes all but one remaining core dependency of the protocol library, making it very close to being able to be separated from the server core entirely.
2021-07-14 14:26:32 +01:00
Dylan T
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40:43 +01:00
Dylan K. Taylor
0910054c41
NetworkSession: Fixed InventoryManager nullability disaster
...
fixes #4277
fixes #4275
fixes #3139
2021-06-26 17:44:42 +01:00
Dylan K. Taylor
61c59be299
Replace hardcoded block metadata shifts and masks with constants
...
we might want to make these bigger than 4 bits in the future.
2021-06-16 12:48:09 +01:00
Dylan K. Taylor
2bbb24fab7
Merge branch 'stable'
2021-06-08 20:00:08 +01:00
Dylan K. Taylor
8171b18002
Separate ItemTypeDictionary implementation from initialization
...
we're not going to want implementation details like how it's setup getting in the way when we separate protocol from the core.
2021-05-29 14:24:05 +01:00
Dylan K. Taylor
593a8ac529
Added Loom blocks
...
these don't support doing patterns yet, but their inventories work.
2021-04-29 19:51:09 +01:00