blob: e6dfb8e9dfb9566522ad0677fcd83089934c6fb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package ihl.enviroment;
import net.minecraft.block.BlockAir;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class GlowningAirBlock extends BlockAir
{
public GlowningAirBlock()
{
super();
this.setBlockName("glowningAir");
this.setLightLevel(1.0f);
this.setBlockTextureName("glass");
}
@Override
public boolean isAir(IBlockAccess world, int x, int y, int z)
{
return true;
}
@Override
public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
{
if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).getCreatureAttribute() == EnumCreatureAttribute.UNDEAD)
{
entity.setFire(20);
}
}
}
|