Revert "Added several more functions to pre-existing classes:"

This reverts commit e9a8f8cebc.
This commit is contained in:
KAMKEEL committed 2022-11-06 00:10:04 -04:00
1 parent 0d3436c71b
commit 6ae465c5d0
51 files changed
+226 -1024

No files matched your search

@@ -1,19 +1,13 @@
package noppes.npcs.scripted.entity;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import noppes.npcs.scripted.constants.EntityType;
import noppes.npcs.scripted.interfaces.entity.IAnimal;
import noppes.npcs.scripted.interfaces.entity.IPlayer;
import noppes.npcs.scripted.interfaces.item.IItemStack;
public class ScriptAnimal<T extends EntityAnimal> extends ScriptLiving<T> implements IAnimal {
protected T entity;
public ScriptAnimal(T entity) {
super(entity);
this.entity = entity;
}
@Override
@@ -21,35 +15,8 @@ public class ScriptAnimal<T extends EntityAnimal> extends ScriptLiving<T> implem
return EntityType.ANIMAL;
}
/**
* Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on
* the animal type)
*/
public boolean isBreedingItem(IItemStack itemStack) {
return this.entity.isBreedingItem(itemStack.getMCItemStack());
}
/**
* Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
*/
public boolean interact(IPlayer player) {
return this.entity.interact((EntityPlayer) player.getMCEntity());
}
public boolean isInLove() {
return this.entity.isInLove();
}
public void resetInLove() {
this.entity.resetInLove();
}
public boolean canMateWith(IAnimal animal) {
return this.entity.canMateWith((EntityAnimal) animal.getMCEntity());
}
@Override
public boolean typeOf(int type){
return type == EntityType.ANIMAL || super.typeOf(type);
return type == EntityType.ANIMAL?true:super.typeOf(type);
}
}