mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
43 lines
946 B
Java
43 lines
946 B
Java
package com.hbm.entity.mob;
|
|
|
|
import com.hbm.entity.effect.EntityMist;
|
|
import com.hbm.inventory.fluid.Fluids;
|
|
|
|
import net.minecraft.entity.monster.EntityCreeper;
|
|
import net.minecraft.util.DamageSource;
|
|
import net.minecraft.world.World;
|
|
|
|
public class EntityCreeperPhosgene extends EntityCreeper {
|
|
|
|
public EntityCreeperPhosgene(World world) {
|
|
super(world);
|
|
this.fuseTime = 20; //ehehehehehe
|
|
}
|
|
|
|
@Override
|
|
public boolean attackEntityFrom(DamageSource source, float amount) {
|
|
|
|
if(!source.isDamageAbsolute() && !source.isUnblockable()) {
|
|
amount -= 4F;
|
|
}
|
|
|
|
if(amount < 0) return false;
|
|
|
|
return super.attackEntityFrom(source, amount);
|
|
}
|
|
|
|
@Override
|
|
public void func_146077_cc() {
|
|
|
|
if(!this.worldObj.isRemote) {
|
|
this.setDead();
|
|
|
|
EntityMist mist = new EntityMist(worldObj);
|
|
mist.setType(Fluids.PHOSGENE);
|
|
mist.setPosition(posX, posY, posZ);
|
|
mist.setArea(10, 5);
|
|
worldObj.spawnEntityInWorld(mist);
|
|
}
|
|
}
|
|
}
|