Make smoldering grass melt snow

This commit is contained in:
Cheeserolls 2015-05-22 23:29:52 +01:00
parent ee22af02e0
commit 6a1347ff6f
1 changed files with 9 additions and 1 deletions

View File

@ -37,7 +37,6 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
// TODO: smoldering grass should probably melt snow that falls on it
public class BlockBOPGrass extends BlockGrass implements IBOPBlock public class BlockBOPGrass extends BlockGrass implements IBOPBlock
{ {
@ -241,6 +240,15 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock
} }
break; break;
case SMOLDERING:
// smoldering grass melts snow
IBlockState stateAbove = world.getBlockState(pos.up());
if (stateAbove.getBlock().getMaterial() == Material.snow)
{
world.setBlockToAir(pos.up());
}
break;
default: default:
break; break;
} }