mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
world events: ignore null events
This commit is contained in:
parent
e30a5de578
commit
2779fd3be5
@ -26,7 +26,7 @@ import de.bixilon.minosoft.util.logging.LogMessageType
|
|||||||
@LoadPacket
|
@LoadPacket
|
||||||
class WorldEventS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
class WorldEventS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||||
val eventId: Int = buffer.readInt()
|
val eventId: Int = buffer.readInt()
|
||||||
val event = buffer.connection.registries.worldEventRegistry[eventId]
|
val event = buffer.connection.registries.worldEventRegistry.getOrNull(eventId)
|
||||||
var position: Vec3i = if (buffer.versionId < ProtocolVersions.V_14W03B) {
|
var position: Vec3i = if (buffer.versionId < ProtocolVersions.V_14W03B) {
|
||||||
buffer.readByteBlockPosition()
|
buffer.readByteBlockPosition()
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user