mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Hopefully fixed PersistentServerData sometimes not remembering the data
This commit is contained in:
parent
bf237a0782
commit
38bdab15fd
2 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue