2013-11-23 09:31:19 -05:00
|
|
|
package tconstruct.blocks;
|
|
|
|
|
|
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
|
import net.minecraft.entity.Entity;
|
|
|
|
|
import net.minecraft.entity.EntityLivingBase;
|
|
|
|
|
import net.minecraft.potion.Potion;
|
|
|
|
|
import net.minecraft.potion.PotionEffect;
|
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
|
import net.minecraftforge.fluids.Fluid;
|
|
|
|
|
|
|
|
|
|
public class BloodBlock extends TConstructFluid
|
|
|
|
|
{
|
|
|
|
|
|
2014-01-29 22:58:29 -05:00
|
|
|
public BloodBlock(Fluid fluid, Material material, String texture)
|
2013-11-23 09:31:19 -05:00
|
|
|
{
|
2014-01-29 22:58:29 -05:00
|
|
|
super(fluid, material, texture);
|
2013-11-23 09:31:19 -05:00
|
|
|
}
|
2014-02-05 09:11:06 -05:00
|
|
|
|
2013-11-23 09:31:19 -05:00
|
|
|
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
|
|
|
|
|
{
|
|
|
|
|
if (entity instanceof EntityLivingBase)
|
|
|
|
|
{
|
2014-02-05 09:11:06 -05:00
|
|
|
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 20 * 15, 0));
|
|
|
|
|
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 20 * 5, 1));
|
2013-11-23 09:31:19 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|