mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 19:58:34 +01:00
fixed the placer ignoring placement checks for redstone and gold powder
This commit is contained in:
parent
6248495b0b
commit
0d9d466efd
1 changed files with 8 additions and 2 deletions
|
@ -112,9 +112,15 @@ public class TileEntityPlacer extends TileEntityImpl implements ITickable {
|
|||
|
||||
private boolean handleSpecialCases(ItemStack stack, BlockPos pos) {
|
||||
if (stack.getItem() == Items.REDSTONE)
|
||||
this.world.setBlockState(pos, Blocks.REDSTONE_WIRE.getDefaultState());
|
||||
if (Blocks.REDSTONE_WIRE.canPlaceBlockAt(this.world, pos))
|
||||
this.world.setBlockState(pos, Blocks.REDSTONE_WIRE.getDefaultState());
|
||||
else
|
||||
return false;
|
||||
else if (stack.getItem() == Item.getItemFromBlock(ModBlocks.GOLD_POWDER))
|
||||
this.world.setBlockState(pos, ModBlocks.GOLD_POWDER.getDefaultState());
|
||||
if (ModBlocks.GOLD_POWDER.canPlaceBlockAt(this.world, pos))
|
||||
this.world.setBlockState(pos, ModBlocks.GOLD_POWDER.getDefaultState());
|
||||
else
|
||||
return false;
|
||||
else if (stack.getItem() instanceof IPlantable) {
|
||||
IPlantable plantable = (IPlantable) stack.getItem();
|
||||
IBlockState plant = plantable.getPlant(this.world, pos);
|
||||
|
|
Loading…
Reference in a new issue