From db595d661a726460d74457a04a0f10dd2c2bdf2c Mon Sep 17 00:00:00 2001 From: MCTian-mi <35869948+MCTian-mi@users.noreply.github.com> Date: Sun, 6 Oct 2024 15:40:51 +0800 Subject: [PATCH] fix drop pad re-appear when you switch to survival mode --- src/main/java/supersymmetry/common/EventHandlers.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/supersymmetry/common/EventHandlers.java b/src/main/java/supersymmetry/common/EventHandlers.java index 5476c8583..b7068408c 100644 --- a/src/main/java/supersymmetry/common/EventHandlers.java +++ b/src/main/java/supersymmetry/common/EventHandlers.java @@ -53,14 +53,13 @@ public class EventHandlers { @SubscribeEvent public static void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) { - if (event.player.isCreative()) return; - NBTTagCompound playerData = event.player.getEntityData(); NBTTagCompound data = playerData.hasKey(EntityPlayer.PERSISTED_NBT_TAG) ? playerData.getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG) : new NBTTagCompound(); if(!event.player.getEntityWorld().isRemote && !data.getBoolean(FIRST_SPAWN)) { data.setBoolean(FIRST_SPAWN, true); + if (event.player.isCreative()) return; playerData.setTag(EntityPlayer.PERSISTED_NBT_TAG, data); EntityDropPod dropPod = new EntityDropPod(event.player.getEntityWorld(), event.player.posX, event.player.posY + 256, event.player.posZ);