Fix placement of snow cover over metadata 6. Closes #724

This commit is contained in:
Lex Manos 2013-09-30 13:52:17 -07:00
parent b3c715c312
commit 81efd38fee
1 changed files with 18 additions and 1 deletions

View File

@ -53,7 +53,7 @@
par1World.setBlockToAir(par2, par3, par4);
}
}
@@ -177,4 +176,10 @@
@@ -177,4 +176,27 @@
{
return par5 == 1 ? true : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
}
@ -62,5 +62,22 @@
+ public int quantityDropped(int meta, int fortune, Random random)
+ {
+ return (meta & 7) + 1;
+ }
+
+ /**
+ * Determines if a new block can be replace the space occupied by this one,
+ * Used in the player's placement code to make the block act like water, and lava.
+ *
+ * @param world The current world
+ * @param x X Position
+ * @param y Y position
+ * @param z Z position
+ * @return True if the block is replaceable by another block
+ */
+ @Override
+ public boolean isBlockReplaceable(World world, int x, int y, int z)
+ {
+ int meta = world.getBlockMetadata(x, y, z);
+ return (meta >= 7 ? false : blockMaterial.isReplaceable());
+ }
}