Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lolmod.entitys;
- import net.minecraft.entity.EntityCreature;
- import net.minecraft.world.World;
- public class EntityNeutral extends EntityCreature {
- private int patienceBar;
- public EntityNeutral(World worldIn) {
- super(worldIn);
- this.patienceBar=100;
- }
- public int getPatienceBar() {
- return patienceBar;
- }
- @Override
- public void onLivingUpdate() {
- super.onLivingUpdate();
- if(this.patienceBar>0 && this.getDistance(this.getHomePosition().getX(), this.getHomePosition().getY(), this.getHomePosition().getZ())>5)
- this.patienceBar--;
- }
- public void setPatienceBar(int patienceBar) {
- this.patienceBar = patienceBar;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement