Power and redstone conduits working (no gui)

This commit is contained in:
cp committed 2014-03-03 03:16:08 +08:00
1 parent b6a2514984
commit c3a60feafc
36 files changed
+692 -879

No files matched your search

+3 -3
View File
@@ -65,7 +65,7 @@ public class Util {
}
// derived from ItemBlock.onItemUse
public static BlockCoord canPlaceItem(ItemStack itemUsed, int blockIdToBePlaced, EntityPlayer player, World world, int x, int y, int z, int side) {
public static BlockCoord canPlaceItem(ItemStack itemUsed, Block blockIdToBePlaced, EntityPlayer player, World world, int x, int y, int z, int side) {
Block block = world.getBlock(x, y, z);
if(block == Blocks.snow_layer && (world.getBlockMetadata(x, y, z) & 7) < 1) {
@@ -92,9 +92,9 @@ public class Util {
return null;
} else if(!player.canPlayerEdit(x, y, z, side, itemUsed)) {
return null;
} else if(y == 255 && Block.getBlockById(blockIdToBePlaced).getMaterial().isSolid()) {
} else if(y == 255 && blockIdToBePlaced.getMaterial().isSolid()) {
return null;
} else if(world.canPlaceEntityOnSide(Block.getBlockById(blockIdToBePlaced), x, y, z, false, side, player, itemUsed)) {
} else if(world.canPlaceEntityOnSide(blockIdToBePlaced, x, y, z, false, side, player, itemUsed)) {
return new BlockCoord(x, y, z);
}
return null;