diff --git a/src/main/java/ellpeck/actuallyadditions/event/EntityConstructingEvent.java b/src/main/java/ellpeck/actuallyadditions/event/EntityConstructingEvent.java index b6a65afe8..42b6cfa8f 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/EntityConstructingEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/EntityConstructingEvent.java @@ -20,7 +20,7 @@ public class EntityConstructingEvent{ @SubscribeEvent public void onEntityConstructing(EntityEvent.EntityConstructing event){ - if(event.entity instanceof EntityPlayer){ + if(event.entity instanceof EntityPlayer && !event.entity.worldObj.isRemote){ if(PersistentServerData.get((EntityPlayer)event.entity) == null){ event.entity.registerExtendedProperties(ModUtil.MOD_ID, new PersistentServerData()); } diff --git a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentServerData.java b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentServerData.java index e8d48a82a..c7cd58aa6 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentServerData.java +++ b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentServerData.java @@ -34,7 +34,7 @@ public class PersistentServerData implements IExtendedEntityProperties{ public void saveNBTData(NBTTagCompound aComp){ NBTTagCompound compound = new NBTTagCompound(); - compound.setBoolean("BookGotten", bookGottenAlready); + compound.setBoolean("BookGotten", this.bookGottenAlready); aComp.setTag(ModUtil.MOD_ID, compound); }