Skip to content

Commit

Permalink
fix drop pad re-appear when you switch to survival mode
Browse files Browse the repository at this point in the history
  • Loading branch information
MCTian-mi committed Oct 6, 2024
1 parent b22f21b commit a400ee4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/supersymmetry/common/EventHandlers.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ 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);
playerData.setTag(EntityPlayer.PERSISTED_NBT_TAG, data);
if (event.player.isCreative()) return;

EntityDropPod dropPod = new EntityDropPod(event.player.getEntityWorld(), event.player.posX, event.player.posY + 256, event.player.posZ);

Expand Down

0 comments on commit a400ee4

Please sign in to comment.