e383f6d8f8
Merge branch 'next-major' into modern-world-support
2022-04-20 14:29:22 +01:00
6b4687a36b
RuntimeBlockMapping: unseal constructor to facilitate easier testing of new versions
2022-04-20 14:00:20 +01:00
63b2e7cc4f
fix CS
2022-04-15 19:25:39 +01:00
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
ed95679953
Merge branch 'next-minor' into modern-world-support
2022-03-23 13:42:46 +00:00
c8e1cfcbee
TypeConverter: account for possible out-of-range meta in items
2022-03-18 19:34:51 +00:00
e58b3ba46c
First look at loading 1.13+ worlds
2022-02-07 03:06:59 +00:00
dd3b79b142
phpstorm sucks
2022-02-07 02:50:43 +00:00
863f9560b0
RuntimeBlockMapping: make fallbackStateData not useless
2022-02-07 02:49:19 +00:00
f870568e62
fix RuntimeBlockMapping
2022-02-07 02:46:50 +00:00
d55eed803d
make build green
2022-02-05 21:12:11 +00:00
f4f4ea1483
fix CS
2022-02-01 17:44:12 +00:00
979f6f3d57
Rewrite RuntimeBlockMapping to use BlockStateSerializer
2022-02-01 17:34:32 +00:00
be1996752a
Replace disallowed operators in src/network/
2022-01-20 19:11:32 +00:00
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
8b73549355
Use JSON_THROW_ON_ERROR for json_encode() and json_decode()
2021-12-08 19:14:07 +00:00
eb0cf52d81
Remove useless code ( #4590 )
2021-11-23 17:09:33 +00:00
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
93a1e84ad9
TypeConverter: further simplification
2021-11-08 20:27:53 +00:00
c33f97ae41
TypeConverter: clean up absurdly overcomplicated bullshit in createInventoryAction()
2021-11-08 20:18:19 +00:00
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
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
80b402e529
ItemTranslator: throw the proper exceptions when failing to map network IDs
2021-10-20 14:01:39 +01:00
9b94a4661b
ItemTranslator: Use LegacyItemIdToStringMap instead of reading files directly
2021-10-11 22:17:40 +01:00
e62794e4cf
TypeConverter: fixed PHPStan errors
2021-10-11 15:17:32 +01:00
8ac16345a3
TypeConverter: account for items without properly mapped IDs
...
fixes #4459
2021-10-11 15:05:08 +01:00
13178a47a5
fuck you git
2021-10-05 19:11:10 +01:00
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
4a787769bf
Merge branch 'stable'
2021-09-09 16:06:16 +01:00
1bbf739385
the function stringToLegacy gives already null useless to put a default null ( #4338 )
2021-07-31 16:54:31 +01:00
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
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40:43 +01:00
0910054c41
NetworkSession: Fixed InventoryManager nullability disaster
...
fixes #4277
fixes #4275
fixes #3139
2021-06-26 17:44:42 +01:00
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
2bbb24fab7
Merge branch 'stable'
2021-06-08 20:00:08 +01:00
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
593a8ac529
Added Loom blocks
...
these don't support doing patterns yet, but their inventories work.
2021-04-29 19:51:09 +01:00
8d2ee516f0
Merge branch 'stable'
2021-04-16 18:26:33 +01:00
1e6d97a157
Merge branch 'stable'
2021-04-07 21:25:39 +01:00
7578bca006
Merge tag '3.18.2'
2021-04-07 19:41:57 +01:00
25998720ce
Fixed server crash on invalid gamemode in SetPlayerGameTypePacket
...
this really ought to be detected at the decode layer, but right now that's a bit difficult ...
2021-03-28 21:11:07 +01:00
6d622c4020
Merge branch 'stable'
2021-03-14 23:32:09 +00:00
3fe0adbd7f
Merge branch 'stable'
2021-03-14 20:14:08 +00:00
a5315991d5
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/serializer/PacketSerializer.php
# src/world/biome/Biome.php
# tests/phpstan/configs/l8-baseline.neon
2020-12-05 01:30:39 +00:00
af1fe7c293
Merge branch 'stable'
2020-11-21 21:13:48 +00:00
f2bdbb0c35
TypeConverter: fix using singleton to get its own context
...
I guess this must have been refactored from some other class?...
2020-11-20 21:31:06 +00:00
15a2fd6e4f
LegacySkinAdapter: check return value of json_encode() for resource patch
2020-10-08 21:42:07 +01:00
01b44ab0bc
protocol: moved skin data types to their own namespace
2020-10-08 21:20:57 +01:00
3b4e9eea96
RuntimeBlockMapping: drop useless doc comment
2020-09-25 17:43:00 +01:00
5661d0496f
RuntimeBlockMapping::toRuntimeId() now accepts a single integer instead of id/meta
...
the expectation is that eventually this will receive arbitrary internal runtime IDs instead of static id/meta, and RuntimeBlockMapping doesn't really care about this crap anyway.
2020-09-20 12:16:11 +01:00