From e0c6f0f00f0cae74d5cc2ffd58399965f0b96bd2 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Mon, 2 Sep 2019 17:47:19 +0100 Subject: [PATCH] Add null check in transportation packet handler, fixes #229 --- src/main/java/electroblob/wizardry/client/ClientProxy.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/electroblob/wizardry/client/ClientProxy.java b/src/main/java/electroblob/wizardry/client/ClientProxy.java index 97ea46d5..b5d75afb 100644 --- a/src/main/java/electroblob/wizardry/client/ClientProxy.java +++ b/src/main/java/electroblob/wizardry/client/ClientProxy.java @@ -475,6 +475,9 @@ public class ClientProxy extends CommonProxy { World world = Minecraft.getMinecraft().world; Entity caster = world.getEntityByID(message.casterID); + + if(caster == null) return; // Shouldn't happen + // Moved from when the packet is sent to when it is received; fixes the sound not playing in first person. caster.playSound(WizardrySounds.SPELL_TRANSPORTATION_TRAVEL, 1, 1);