From eb7b7ac278d28d2b905fb7d4ce66d00d814a95f6 Mon Sep 17 00:00:00 2001 From: Patbox <39821509+Patbox@users.noreply.github.com> Date: Fri, 5 Jul 2024 23:49:25 +0200 Subject: [PATCH] Fix Entity passenger bug --- gradle.properties | 2 +- .../virtualentity/mixin/EntityPassengersSetS2CPacketMixin.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3f1116ec..de02c6f9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ fabric_version=0.100.0+1.21 maven_group = eu.pb4 -mod_version = 0.9.3 +mod_version = 0.9.4 minecraft_version_supported = ">=1.20.5-" diff --git a/polymer-virtual-entity/src/main/java/eu/pb4/polymer/virtualentity/mixin/EntityPassengersSetS2CPacketMixin.java b/polymer-virtual-entity/src/main/java/eu/pb4/polymer/virtualentity/mixin/EntityPassengersSetS2CPacketMixin.java index 58a52e51..db844015 100644 --- a/polymer-virtual-entity/src/main/java/eu/pb4/polymer/virtualentity/mixin/EntityPassengersSetS2CPacketMixin.java +++ b/polymer-virtual-entity/src/main/java/eu/pb4/polymer/virtualentity/mixin/EntityPassengersSetS2CPacketMixin.java @@ -51,7 +51,7 @@ public class EntityPassengersSetS2CPacketMixin { @ModifyArg(method = "write", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/PacketByteBuf;writeIntArray([I)Lnet/minecraft/network/PacketByteBuf;")) private int[] addDynamicPassengers(int[] a) { - if (this.virtualPassengers.isEmpty()) { + if (this.virtualPassengers == null || this.virtualPassengers.isEmpty()) { return a; } var player = PolymerCommonUtils.getPlayerContext();