Skip to content

Commit

Permalink
Merge pull request #321 from MCTian-mi/Im-dumb-sorry
Browse files Browse the repository at this point in the history
fix drop pad re-appear when you switch to survival mode
  • Loading branch information
bruberu authored Oct 6, 2024
2 parents b22f21b + a400ee4 commit 00d0fb3
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 00d0fb3

Please sign in to comment.