Added more functions to IPlayer, IEntityLiving, IEntityLivingBase, and IAnimal.

This commit is contained in:
Luis C.M committed 2022-12-26 01:13:28 -06:00
1 parent 25dcc975df
commit 1ac0b3b0a3
4 files changed
+43 -3

No files matched your search

@@ -2,6 +2,7 @@ package noppes.npcs.scripted.entity;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
import noppes.npcs.scripted.NpcAPI;
import noppes.npcs.scripted.constants.EntityType;
import noppes.npcs.api.entity.IAnimal;
import noppes.npcs.api.entity.IPlayer;
@@ -35,6 +36,14 @@ public class ScriptAnimal<T extends EntityAnimal> extends ScriptLiving<T> implem
return this.entity.interact((EntityPlayer) player.getMCEntity());
}
public void setFollowPlayer(IPlayer player) {
this.entity.func_146082_f((EntityPlayer) player.getMCEntity());
}
public IPlayer followingPlayer() {
return (IPlayer) NpcAPI.Instance().getIEntity(this.entity.func_146083_cb());
}
public boolean isInLove() {
return this.entity.isInLove();
}
@@ -47,7 +56,6 @@ public class ScriptAnimal<T extends EntityAnimal> extends ScriptLiving<T> implem
return this.entity.canMateWith((EntityAnimal) animal.getMCEntity());
}
@Override
public boolean typeOf(int type){
return type == EntityType.ANIMAL || super.typeOf(type);
}