Hopefully fixed PersistentServerData sometimes not remembering the data

This commit is contained in:
Ellpeck 2015-10-17 20:53:28 +02:00
parent bf237a0782
commit 38bdab15fd
2 changed files with 2 additions and 2 deletions

View file

@ -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());
}

View file

@ -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);
}