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.SideOnly;
// TODO: smoldering grass should probably melt snow that falls on it
public class BlockBOPGrass extends BlockGrass implements IBOPBlock
{
@ -240,6 +239,15 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock
world.setBlockState(pos, this.getDefaultState().withProperty(VARIANT, BOPGrassType.SMOLDERING));
}
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:
break;