Fixed Solar Neutron Activator not rendering in inventory, fixed Solar Neutron Activator replacing blocks

This commit is contained in:
Aidan C. Brady committed 2015-03-29 10:49:28 -04:00
1 parent 6ec5a0a2fe
commit 61735a27aa
3 files changed
+9 -9

No files matched your search

@@ -262,19 +262,21 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
{
Block b = world.getBlock(xPos, yPos, zPos);
if(yPos > 255)
if(yPos > 255 || !b.isReplaceable(world, xPos, yPos, zPos))
{
place = false;
}
if(!b.isAir(world, xPos, yPos, zPos) && !b.isReplaceable(world, xPos, yPos, zPos))
{
return false;
}
}
}
}
}
else if(type == MachineType.SOLAR_NEUTRON_ACTIVATOR)
{
if(y+1 > 255 || !world.getBlock(x, y+1, z).isReplaceable(world, x, y+1, z))
{
place = false;
}
}
if(place && super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata))
{