@Override public IMessage onMessage(ChocoboHunger message, MessageContext ctx) { EntityAnimalChocobo chocobo = PacketHelper.getChocoboByID(message.entityID, message.dimensionId); if (chocobo != null) { chocobo.setTimeUntilHunger(message.hungerTime); } return null; }
@Override public IMessage onMessage(ChocoboHealth message, MessageContext ctx) { EntityAnimalChocobo chocobo = PacketHelper.getChocoboByID(message.entityID, message.dimensionId); if (chocobo != null) { chocobo.setHealth(message.health); } return null; }
public ChocoboHunger(EntityAnimalChocobo chocobo) { this.entityID = chocobo.getEntityId(); this.hungerTime = chocobo.getTimeUntilHunger(); this.dimensionId = chocobo.worldObj.provider.dimensionId; }
public ChocoboHealth(EntityAnimalChocobo chocobo) { this.entityID = chocobo.getEntityId(); this.health = (int) chocobo.getHealth(); this.dimensionId = chocobo.worldObj.provider.dimensionId; }