Fixed potential data manager crashes

This commit is contained in:
Kino 2017-12-27 22:41:02 -05:00
parent e714a2e50c
commit 9b12143571
8 changed files with 16 additions and 30 deletions

View file

@ -720,7 +720,7 @@ public class EntitySlider extends EntityFlying implements IAetherBoss
public boolean isAwake()
{
return this.dataManager.get(SLIDER_AWAKE);
return this.dataManager.get(SLIDER_AWAKE).booleanValue();
}
}

View file

@ -671,7 +671,7 @@ public class EntitySunSpirit extends EntityFlying implements IMob, IAetherBoss
public int getChatLine()
{
return this.dataManager.get(CHAT_LINE);
return this.dataManager.get(CHAT_LINE).intValue();
}
public void setChatLine(int lineNumber)
@ -682,7 +682,7 @@ public class EntitySunSpirit extends EntityFlying implements IMob, IAetherBoss
public boolean isFreezing()
{
return this.dataManager.get(FROZEN);
return this.dataManager.get(FROZEN).booleanValue();
}
public void setFreezing(boolean isFreezing)

View file

@ -663,7 +663,7 @@ public class EntityValkyrieQueen extends EntityMob implements IAetherBoss
public boolean isBossReady()
{
return this.dataManager.get(VALKYRIE_READY);
return this.dataManager.get(VALKYRIE_READY).booleanValue();
}
}

View file

@ -197,7 +197,7 @@ public class EntitySentry extends EntityLiving implements IMob
public boolean isAwake()
{
return this.dataManager.get(SENTRY_AWAKE);
return this.dataManager.get(SENTRY_AWAKE).booleanValue();
}
public float getEyeHeight()

View file

@ -103,7 +103,7 @@ public class EntityWhirlwind extends EntityMob
public Integer getColorData()
{
return this.dataManager.get(COLOR_DATA);
return this.dataManager.get(COLOR_DATA).intValue();
}
public void setEvil(boolean isEvil)
@ -113,7 +113,7 @@ public class EntityWhirlwind extends EntityMob
public boolean isEvil()
{
return this.dataManager.get(IS_EVIL);
return this.dataManager.get(IS_EVIL).booleanValue();
}
public void onLivingUpdate()

View file

@ -118,7 +118,7 @@ public class EntityAerbunny extends EntityAetherAnimal
public int getPuffiness()
{
return this.dataManager.get(PUFF);
return this.dataManager.get(PUFF).intValue();
}
public void setPuffinessClient(int i)

View file

@ -125,7 +125,7 @@ public class EntityMoa extends EntitySaddleMount
public boolean isSitting()
{
return this.dataManager.get(SITTING);
return this.dataManager.get(SITTING).booleanValue();
}
public void setSitting(boolean isSitting)
@ -135,7 +135,7 @@ public class EntityMoa extends EntitySaddleMount
public boolean isHungry()
{
return this.dataManager.get(HUNGRY);
return this.dataManager.get(HUNGRY).booleanValue();
}
public void setHungry(boolean hungry)
@ -145,7 +145,7 @@ public class EntityMoa extends EntitySaddleMount
public byte getAmountFed()
{
return this.dataManager.get(AMMOUNT_FEED);
return this.dataManager.get(AMMOUNT_FEED).byteValue();
}
public void setAmountFed(int amountFed)
@ -160,7 +160,7 @@ public class EntityMoa extends EntitySaddleMount
public boolean isPlayerGrown()
{
return this.dataManager.get(PLAYER_GROWN);
return this.dataManager.get(PLAYER_GROWN).booleanValue();
}
public void setPlayerGrown(boolean playerGrown)
@ -180,7 +180,7 @@ public class EntityMoa extends EntitySaddleMount
public int getRemainingJumps()
{
return this.dataManager.get(REMAINING_JUMPS);
return this.dataManager.get(REMAINING_JUMPS).intValue();
}
public void setRemainingJumps(int jumps)
@ -190,7 +190,7 @@ public class EntityMoa extends EntitySaddleMount
public AetherMoaType getMoaType()
{
return AetherAPI.getInstance().getMoaType(this.dataManager.get(MOA_TYPE_ID));
return AetherAPI.getInstance().getMoaType(this.dataManager.get(MOA_TYPE_ID).intValue());
}
public void setMoaType(AetherMoaType moaType)

View file

@ -566,14 +566,7 @@ public class EntitySwet extends EntityMountable
public boolean isFriendly()
{
Object obj = this.dataManager.get(FRIENDLY);
if (!(obj instanceof Boolean))
{
return false;
}
return (Boolean) obj;
return this.dataManager.get(FRIENDLY).booleanValue();
}
private void setFriendly(boolean friendly)
@ -583,14 +576,7 @@ public class EntitySwet extends EntityMountable
public int getType()
{
Object obj = this.dataManager.get(SWET_TYPE);
if (!(obj instanceof Integer))
{
return 0;
}
return (Integer) obj;
return this.dataManager.get(SWET_TYPE).intValue();
}
private void setType(int type)