예제 #1
0
 @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;
 }
예제 #2
0
 @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;
 }
예제 #3
0
 public ChocoboHunger(EntityAnimalChocobo chocobo) {
   this.entityID = chocobo.getEntityId();
   this.hungerTime = chocobo.getTimeUntilHunger();
   this.dimensionId = chocobo.worldObj.provider.dimensionId;
 }
예제 #4
0
 public ChocoboHealth(EntityAnimalChocobo chocobo) {
   this.entityID = chocobo.getEntityId();
   this.health = (int) chocobo.getHealth();
   this.dimensionId = chocobo.worldObj.provider.dimensionId;
 }