package pneumaticCraft.client.render.pneumaticArmor.hacking.entity;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.EntityBat;
import net.minecraft.entity.player.EntityPlayer;
import pneumaticCraft.api.client.pneumaticHelmet.IHackableEntity;
public class HackableBat implements IHackableEntity{
@Override
public String getId(){
return null;
}
@Override
public boolean canHack(Entity entity, EntityPlayer player){
return entity.getClass() == EntityBat.class;
}
@Override
public void addInfo(Entity entity, List<String> curInfo, EntityPlayer player){
curInfo.add("pneumaticHelmet.hacking.result.kill");
}
@Override
public void addPostHackInfo(Entity entity, List<String> curInfo, EntityPlayer player){
curInfo.add("pneumaticHelmet.hacking.finished.killed");
}
@Override
public int getHackTime(Entity entity, EntityPlayer player){
return 60;
}
@Override
public void onHackFinished(Entity entity, EntityPlayer player){
if(!entity.worldObj.isRemote) {
entity.setDead();
entity.worldObj.createExplosion(null, entity.posX, entity.posY, entity.posZ, 0, false);
}
}
@Override
public boolean afterHackTick(Entity entity){
return false;
}
}