Files
TinkersConstruct/src/main/java/tconstruct/blocks/BloodBlock.java
T

27 lines
874 B
Java
Raw Normal View History

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)
{
2014-01-29 22:58:29 -05:00
super(fluid, material, texture);
}
2014-02-05 09:11:06 -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));
}
}
}