11552 Commits

Author SHA1 Message Date
Dylan K. Taylor
ff53ddd3ad PrepareEncryptionTask: fix wrongly-specified nullability of serverPrivateKey 2020-05-06 13:29:58 +01:00
Dylan K. Taylor
b4606a4cd0 remove PM resource interaction from StartGamePacket
also lose the cache, because it's not very useful ...
2020-05-06 13:17:16 +01:00
Dylan K. Taylor
218f32f5b8 De-duplicate code used by legacy <-> string ID mapping classes 2020-05-06 13:15:54 +01:00
Dylan K. Taylor
dbd51610c3 TypeConverter: use SingletonTrait 2020-05-05 19:22:20 +01:00
Dylan K. Taylor
9cf410d484 Player: fixed broken behaviour of entity spawning on chunk send, closes #3355 2020-05-05 18:55:13 +01:00
Dylan K. Taylor
c2b438ccb6 git you need to stop doing this to me REEEEEEEEEEEEEEEEEEEEEEE 2020-05-04 14:30:01 +01:00
Dylan K. Taylor
81f982a8d9 remove hardcoded legacy entity type ID mapping, load from resources instead 2020-05-04 13:47:39 +01:00
Dylan K. Taylor
f0dfa45172 phpstorm fixing EOF newlines that phpstorm screwed up 2020-05-04 13:46:20 +01:00
Dylan K. Taylor
ba6fb87280 remove unused imports 2020-05-04 13:27:31 +01:00
Dylan K. Taylor
fcd6a69000 cleaning up NBT handling on packet decode/encode
now we always decode, because it's not safe to assume that we can just grab the rest of the bytes in the packet.
2020-05-04 13:23:29 +01:00
Dylan K. Taylor
0eec536f97 Spawnable: remove unused field 2020-05-04 13:10:23 +01:00
Dylan K. Taylor
a73c54bdd0 making tile spawn compound cache use CacheableNbt instead of strings 2020-05-04 12:35:13 +01:00
Dylan K. Taylor
c2857a91bd [Network]ChunkSerializer: allow injecting RuntimeBlockMapping
this will allow the same serializer to be reused with different mapping tables (will be needed for multi version).
2020-05-04 12:14:27 +01:00
Dylan K. Taylor
53a33e8c20 World: remove unused import
we're getting so close !!!
2020-05-04 11:58:57 +01:00
Dylan K. Taylor
d3dcb8a4e3 moving entity attack sounds to server-side 2020-05-04 11:50:42 +01:00
Dylan K. Taylor
d40152e3bb World: fix time sync 2020-05-04 11:23:44 +01:00
Dylan K. Taylor
aac017eae4 World: drop unused and very misleadingly named addChunkPacket() 2020-05-04 10:22:39 +01:00
Dylan K. Taylor
c490bc5a8c World: drop global packet broadcast 2020-05-04 02:31:19 +01:00
Dylan K. Taylor
b1021315b0 World: remove protocol-specialized broadcastLevelEvent() 2020-05-04 02:28:34 +01:00
Dylan K. Taylor
f34753c496 CallbackInventoryListener: fix crash when any of the callbacks isn't provided 2020-05-03 21:48:32 +01:00
Dylan K. Taylor
6e6fffa461 Inventory: added removeAllListeners()
this isn't strictly necessary because it could be done by removeListeners(...getListeners()), but I think developers will appreciate not needing so much boilerplate code.
2020-05-03 21:44:45 +01:00
Dylan K. Taylor
8682ea35f7 Introduce some (not great) API for entity animations
while this API is a bit yucky, it's a step forward for protocol isolation and offers the possibility of controlling animations by adding events.
2020-05-01 13:57:26 +01:00
Dylan K. Taylor
9615186afd rename PunchBlockParticle -> BlockPunchParticle 2020-05-01 12:36:31 +01:00
Dylan K. Taylor
2964a4be35 making BlockPunchSound server-controlled 2020-05-01 12:23:00 +01:00
Dylan K. Taylor
1969766b70 Nix some client-sided sounds, control them from the server
this is a necessary step to knock out the implicit assumption that every player is using the same protocol.
2020-05-01 11:52:32 +01:00
Dylan K. Taylor
6f38031121 Liquid: do not schedule delayed blockupdate when hardening occurs on nearby blockupdate
fix #3390
fix #3392
2020-04-30 09:35:55 +01:00
Dylan K. Taylor
b74f177958 ChunkCache: destroy cache when world is unloaded 2020-04-29 18:50:33 +01:00
Dylan K. Taylor
3ce9a4801f World: allow registering unload hooks
this will be used for cache management when worlds get unloaded.
2020-04-29 18:48:16 +01:00
Dylan K. Taylor
bb11cbd89c World: relocate packet stuff for time and difficulty behind NetworkSession API 2020-04-29 18:31:54 +01:00
Dylan K. Taylor
c8c0a1533c NetworkSession: seal up actor removal behind API 2020-04-29 17:00:47 +01:00
Dylan K. Taylor
adadd5423d move force-close crafting grid hack to InGamePacketHandler
the crafting transaction implementation has no business caring about this
2020-04-29 16:54:23 +01:00
Dylan K. Taylor
4ce6525065 NetworkSession: incomplete abstraction of SetActorDataPacket handling
this needs to have the metadata properties separated too, but that's a job that's going to get VERY messy.
2020-04-29 16:50:52 +01:00
Dylan K. Taylor
d1b28ce17a NetworkSession: allow sending an arbitrary set of attributes for an entity 2020-04-29 16:45:09 +01:00
Dylan K. Taylor
f6f714c158 NetworkSession: do not mark shared attributes as synchronized, they don't necessarily belong to us
if we decided to start sending entity attribute changes to viewers too, this would have caused some unexpected behaviour.
2020-04-29 16:38:10 +01:00
Dylan K. Taylor
f35b7bf80b NetworkBinaryStream: remove stale @throws from getAttributeList() 2020-04-29 16:32:56 +01:00
Dylan K. Taylor
ad70a9e3dc NetworkSession: allow provision of a custom list of players to syncPlayerList() 2020-04-29 16:27:34 +01:00
Dylan K. Taylor
d8968e9e40 box up TakeItemActorPacket sending behind NetworkSession API
we need to start thinking about moving this into interfaces.
2020-04-29 16:24:04 +01:00
Dylan K. Taylor
1122f2a29f phpstorm can't infer these types :( 2020-04-29 13:26:49 +01:00
Dylan K. Taylor
549940d8a7 remove NullPacketHandler
this is a waste of LOC
2020-04-29 13:14:23 +01:00
Dylan K. Taylor
b6214744d5 NetworkSession: inject PacketPool instead of hardcoding it
this will make it slightly easier for multi version implementations, but handlers are still quite a big problem.
2020-04-29 12:48:28 +01:00
Dylan K. Taylor
09e994a026 NetworkBinaryStream: swap BadPacketException for PacketDecodeException 2020-04-29 11:39:44 +01:00
Dylan K. Taylor
098a5518a6 phpstan: ignore another trait override bug 2020-04-29 11:35:12 +01:00
Dylan K. Taylor
f6f1d31112 do not mess with cached data directly in packets 2020-04-29 11:34:25 +01:00
Dylan K. Taylor
aa57d05e12 update to a non-broken build of RakLib 2020-04-29 10:36:28 +01:00
Dylan K. Taylor
8093a94e5d do not hardcode data deserialization into CraftingManager 2020-04-28 18:56:27 +01:00
Dylan K. Taylor
f9a587d40e imports cleanup 2020-04-28 17:27:38 +01:00
Dylan K. Taylor
81044d6aea updated to latest RakLib 2020-04-28 16:30:29 +01:00
Dylan K. Taylor
3be9548b1e net: compressors are now fully dynamic (or at least the potential to be)
the compressor used by RakLibInterface when opening a session is still
hardcoded, but that's because we have no way to select the correct
compressor at that point in the login sequence, since we aren't
propagating the protocol information up from RakLib right now.
2020-04-28 16:21:18 +01:00
Dylan K. Taylor
d9e4783b24 start making network compressors dynamic
this will facilitate future multi version support where compression types are different between versions
2020-04-28 14:47:01 +01:00
Dylan K. Taylor
fe258740e3 SingletonTrait: added setInstance() 2020-04-28 14:31:56 +01:00