Fixed potential data manager crashes
This commit is contained in:
parent
e714a2e50c
commit
9b12143571
|
@ -720,7 +720,7 @@ public class EntitySlider extends EntityFlying implements IAetherBoss
|
||||||
|
|
||||||
public boolean isAwake()
|
public boolean isAwake()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(SLIDER_AWAKE);
|
return this.dataManager.get(SLIDER_AWAKE).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -671,7 +671,7 @@ public class EntitySunSpirit extends EntityFlying implements IMob, IAetherBoss
|
||||||
|
|
||||||
public int getChatLine()
|
public int getChatLine()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(CHAT_LINE);
|
return this.dataManager.get(CHAT_LINE).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setChatLine(int lineNumber)
|
public void setChatLine(int lineNumber)
|
||||||
|
@ -682,7 +682,7 @@ public class EntitySunSpirit extends EntityFlying implements IMob, IAetherBoss
|
||||||
|
|
||||||
public boolean isFreezing()
|
public boolean isFreezing()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(FROZEN);
|
return this.dataManager.get(FROZEN).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFreezing(boolean isFreezing)
|
public void setFreezing(boolean isFreezing)
|
||||||
|
|
|
@ -663,7 +663,7 @@ public class EntityValkyrieQueen extends EntityMob implements IAetherBoss
|
||||||
|
|
||||||
public boolean isBossReady()
|
public boolean isBossReady()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(VALKYRIE_READY);
|
return this.dataManager.get(VALKYRIE_READY).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -197,7 +197,7 @@ public class EntitySentry extends EntityLiving implements IMob
|
||||||
|
|
||||||
public boolean isAwake()
|
public boolean isAwake()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(SENTRY_AWAKE);
|
return this.dataManager.get(SENTRY_AWAKE).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getEyeHeight()
|
public float getEyeHeight()
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class EntityWhirlwind extends EntityMob
|
||||||
|
|
||||||
public Integer getColorData()
|
public Integer getColorData()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(COLOR_DATA);
|
return this.dataManager.get(COLOR_DATA).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEvil(boolean isEvil)
|
public void setEvil(boolean isEvil)
|
||||||
|
@ -113,7 +113,7 @@ public class EntityWhirlwind extends EntityMob
|
||||||
|
|
||||||
public boolean isEvil()
|
public boolean isEvil()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(IS_EVIL);
|
return this.dataManager.get(IS_EVIL).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLivingUpdate()
|
public void onLivingUpdate()
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class EntityAerbunny extends EntityAetherAnimal
|
||||||
|
|
||||||
public int getPuffiness()
|
public int getPuffiness()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(PUFF);
|
return this.dataManager.get(PUFF).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPuffinessClient(int i)
|
public void setPuffinessClient(int i)
|
||||||
|
|
|
@ -125,7 +125,7 @@ public class EntityMoa extends EntitySaddleMount
|
||||||
|
|
||||||
public boolean isSitting()
|
public boolean isSitting()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(SITTING);
|
return this.dataManager.get(SITTING).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSitting(boolean isSitting)
|
public void setSitting(boolean isSitting)
|
||||||
|
@ -135,7 +135,7 @@ public class EntityMoa extends EntitySaddleMount
|
||||||
|
|
||||||
public boolean isHungry()
|
public boolean isHungry()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(HUNGRY);
|
return this.dataManager.get(HUNGRY).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHungry(boolean hungry)
|
public void setHungry(boolean hungry)
|
||||||
|
@ -145,7 +145,7 @@ public class EntityMoa extends EntitySaddleMount
|
||||||
|
|
||||||
public byte getAmountFed()
|
public byte getAmountFed()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(AMMOUNT_FEED);
|
return this.dataManager.get(AMMOUNT_FEED).byteValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAmountFed(int amountFed)
|
public void setAmountFed(int amountFed)
|
||||||
|
@ -160,7 +160,7 @@ public class EntityMoa extends EntitySaddleMount
|
||||||
|
|
||||||
public boolean isPlayerGrown()
|
public boolean isPlayerGrown()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(PLAYER_GROWN);
|
return this.dataManager.get(PLAYER_GROWN).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPlayerGrown(boolean playerGrown)
|
public void setPlayerGrown(boolean playerGrown)
|
||||||
|
@ -180,7 +180,7 @@ public class EntityMoa extends EntitySaddleMount
|
||||||
|
|
||||||
public int getRemainingJumps()
|
public int getRemainingJumps()
|
||||||
{
|
{
|
||||||
return this.dataManager.get(REMAINING_JUMPS);
|
return this.dataManager.get(REMAINING_JUMPS).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRemainingJumps(int jumps)
|
public void setRemainingJumps(int jumps)
|
||||||
|
@ -190,7 +190,7 @@ public class EntityMoa extends EntitySaddleMount
|
||||||
|
|
||||||
public AetherMoaType getMoaType()
|
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)
|
public void setMoaType(AetherMoaType moaType)
|
||||||
|
|
|
@ -566,14 +566,7 @@ public class EntitySwet extends EntityMountable
|
||||||
|
|
||||||
public boolean isFriendly()
|
public boolean isFriendly()
|
||||||
{
|
{
|
||||||
Object obj = this.dataManager.get(FRIENDLY);
|
return this.dataManager.get(FRIENDLY).booleanValue();
|
||||||
|
|
||||||
if (!(obj instanceof Boolean))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (Boolean) obj;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setFriendly(boolean friendly)
|
private void setFriendly(boolean friendly)
|
||||||
|
@ -583,14 +576,7 @@ public class EntitySwet extends EntityMountable
|
||||||
|
|
||||||
public int getType()
|
public int getType()
|
||||||
{
|
{
|
||||||
Object obj = this.dataManager.get(SWET_TYPE);
|
return this.dataManager.get(SWET_TYPE).intValue();
|
||||||
|
|
||||||
if (!(obj instanceof Integer))
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (Integer) obj;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setType(int type)
|
private void setType(int type)
|
||||||
|
|
Loading…
Reference in a new issue