Baby Moa hunger indicator added.
This commit is contained in:
parent
015b7f4984
commit
69c950444d
|
@ -20,6 +20,7 @@ import net.minecraft.network.datasync.DataParameter;
|
|||
import net.minecraft.network.datasync.DataSerializers;
|
||||
import net.minecraft.network.datasync.EntityDataManager;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -223,6 +224,14 @@ public class EntityMoa extends EntitySaddleMount
|
|||
{
|
||||
this.setHungry(true);
|
||||
}
|
||||
|
||||
if(this.worldObj.isRemote && isHungry() && isChild())
|
||||
{
|
||||
if(rand.nextInt(10) == 0)
|
||||
{
|
||||
this.worldObj.spawnParticle(EnumParticleTypes.VILLAGER_ANGRY, this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + 1, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.worldObj.isRemote && !this.isChild() && this.getPassengers().isEmpty())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue