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
e131c2cefa
Drop pocketmine/spl
2021-11-02 16:08:29 +00:00
e34364412b
Replace InvalidStateException usages with InvalidArgument or LogicException
2021-11-02 16:05:54 +00:00
32a857b8b4
fix CS
2021-11-02 14:09:16 +00:00
7e4be29fc4
Gracefully force-shutdown on failure to start RakLib
...
this now won't generate a crashdump.
2021-11-02 13:51:01 +00:00
0f6b7e48cb
Updated BedrockProtocol:
...
it's weirdly satisfying that LevelChunkPacket::create() with the extra parameter turns out to be exactly the same length as the old way.
2021-11-02 01:37:56 +00:00
c3768b997a
Updated to pmmp/BedrockProtocol@146498c279
2021-11-01 16:13:33 +00:00
bd60e41268
Revert "Revert "Player: do not re-request the same ungenerated chunks multiple times""
...
This reverts commit 3265d3f6b4
.
2021-10-31 22:57:56 +00:00
3265d3f6b4
Revert "Player: do not re-request the same ungenerated chunks multiple times"
...
This reverts commit 866020dfdb
.
For some fucking reason this broke resending chunks in some cases (and
sending chunks at all in others). I don't have time to debug this right
now, so it's going to have to remain broken, infuriatingly enough.
2021-10-31 21:25:21 +00:00
866020dfdb
Player: do not re-request the same ungenerated chunks multiple times
...
this doesn't affect chunk resends, since they'll be kicked back to NEEDED, which is detected by orderChunks().
2021-10-31 18:52:37 +00:00
c580bb2434
InGamePacketHandler: mark player as not using item in more cases
...
fixes #4355
2021-10-31 14:41:31 +00:00
88b7389080
InventoryManager: reduce code duplication
2021-10-29 15:37:52 +01:00
5db3915aad
Make MemoryManager aware of ChunkCache
2021-10-28 20:28:00 +01:00
eb40b741ae
StandardPacketBroadcaster now splits broadcasts by session-specific PacketSerializerContext
...
in the normal case, all sessions will share the same PacketSerializerContext and Compressor, so this code will be the same as before
However, for the multi-protocol hackers out there, this should reduce the maintenance burden (@Driesboy) since now only the PacketSerializerContext needs to be maintained. I recommend a separate PacketSerializerContext for each protocol (perhaps put the protocol version in the serializer context too, if you need it for some reason).
2021-10-28 20:15:37 +01:00
0ef5c67b9b
Use static constructor for MovePlayerPacket
...
this marks the last of the packets created using the old way.
2021-10-27 21:10:16 +01:00
04aedc6494
Updated BedrockProtocol
2021-10-23 23:54:49 +01:00
c77829f4ad
Migrate packet creation to use ::create() methods in all but one case
...
MovePlayerPacket doesn't yet have a ::create() due to a complication with fields that aren't always present.
2021-10-23 01:46:01 +01:00
c773e43eda
Updated BedrockProtocol to pmmp/BedrockProtocol@97fa88e9ef
2021-10-23 01:16:45 +01:00
80b402e529
ItemTranslator: throw the proper exceptions when failing to map network IDs
2021-10-20 14:01:39 +01:00
0348236860
fucking CS again
2021-10-14 15:56:50 +01:00
8c07748100
RakLibInterface: print packet exception info as a block using Utils::printableExceptionInfo()
2021-10-14 15:55:08 +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
5b26abcb0e
NetworkSession: fixed code copy pasta
...
these are not, in fact, equivalent.
2021-10-05 01:02:15 +01:00
f2d6059613
NetworkSession: Sync world spawn on world change
2021-10-04 22:51:31 +01:00
bb6ea8cbdc
Do not call PlayerLoginEvent during the Player constructor
...
this closes a lot of loopholes in the login sequence that plugins were using to cause crashes.
2021-10-04 22:36:50 +01:00
356a49d225
NetworkSession: account for possibility of syncGameMode() being called before the player is ready to receive it
...
close #4323
2021-10-04 22:13:42 +01:00
f26f063164
UPnP: catch InternetException when attempting portforward
...
we might fail to get the internal IP for some reason, which shouldn't crash the server.
2021-10-02 00:52:14 +01:00
81d5598e96
UPnP: Fixed server crash on failure to find UPnP device
...
https://crash.pmmp.io/view/5241010
2021-10-01 23:27:58 +01:00
8de30e8162
FastChunkSerializer no longer serializes light by default
...
the core doesn't use this anywhere.
serializeWithoutLight() has been renamed to serializeTerrain() to more accurately describe what it does.
2021-10-01 22:57:22 +01:00
5b818827db
Chunk: stop exposing SplFixedArray<SubChunk> to the API
...
this fixes a large number of PHPStan errors, and also brings us a step closer to negative-build-height readiness.
2021-10-01 22:17:28 +01:00
b3e8314b9f
PTHREADS_INHERIT_CONSTANTS is no longer needed for MainLogger to log exceptions
...
cleaned paths are now referenced from Filesystem instead of namespace constants.
2021-09-26 21:41:24 +01:00
8e2d06a880
ChunkSerializer: support writing 0 bpb palettes on the wire
...
these are now supported as of 1.17.30.
2021-09-25 01:17:32 +01:00
9490b78640
Move packet handler default implementations to BedrockProtocol
...
in many cases this will now require zero changes to PM at all to be compatible with a new protocol version.
2021-09-15 22:27:49 +01:00
3b7580688c
Stop auto-translating string descriptions/usages for commands
...
Require usage of Translatable for translations.
2021-09-11 16:46:40 +01:00
7701e1ff98
InGamePacketHandler: fix regression in movement handling since 82c8fa696a
...
fixes #4291
fixes #4398
2021-09-10 16:52:46 +01:00
4111d92b98
Stop hardcoding chunk dimensions everywhere ( #4443 )
2021-09-10 16:13:25 +01:00
4a787769bf
Merge branch 'stable'
2021-09-09 16:06:16 +01:00
11d2e1ef08
Require ext-chunkutils ^0.3.0
2021-09-07 22:53:50 +01:00
b4e23a57d2
CraftingDataCache: Replace hardcoded recipe block names with constants from BedrockProtocol
2021-08-29 16:26:18 +01:00
14577daae3
fixed build
2021-08-20 23:52:34 +01:00
a012e7ccc0
VersionInfo: make static methods more constant-like
...
if we could have class constants declared at runtime, these would be constant.
2021-08-16 16:37:36 +01:00
5da90b9530
Stop auto-translating strings when not asked
...
fixes #4371
2021-08-15 20:44:27 +01:00
a81680c5c6
missed a few more hardcoded translation keys
2021-08-15 20:12:55 +01:00
039c59856d
Remove % translation prefixes dotted around all over the place
2021-08-15 20:03:38 +01:00
58bc9332cd
Workaround for offhand sync ( #4359 )
...
fixes #4231
2021-08-12 23:27:53 +01:00
27e0ecf7ee
Implemented Blast Furnace and Smoker ( #4362 )
2021-08-12 23:27:05 +01:00