diff --git a/src/main/java/cr0s/warpdrive/block/BlockAbstractContainer.java b/src/main/java/cr0s/warpdrive/block/BlockAbstractContainer.java index 61711d75..43ccff2c 100644 --- a/src/main/java/cr0s/warpdrive/block/BlockAbstractContainer.java +++ b/src/main/java/cr0s/warpdrive/block/BlockAbstractContainer.java @@ -1,6 +1,5 @@ package cr0s.warpdrive.block; -import cr0s.warpdrive.block.forcefield.TileEntityForceFieldProjector; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; @@ -87,6 +86,7 @@ public abstract class BlockAbstractContainer extends BlockContainer { @Override protected void dropBlockAsItem(World world, int x, int y, int z, ItemStack itemStack) { + itemStack.setItemDamage(getDamageValue(world, x, y, z)); TileEntity tileEntity = world.getTileEntity(x, y, z); if (tileEntity == null) { WarpDrive.logger.error("Missing tile entity for " + this + " at " + world + " " + x + " " + y + " " + z); diff --git a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldProjector.java b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldProjector.java index b45f838e..24e60455 100644 --- a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldProjector.java +++ b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceFieldProjector.java @@ -84,6 +84,13 @@ public class BlockForceFieldProjector extends BlockAbstractForceField { } } + @Override + public int getDamageValue(World world, int x, int y, int z) { + super.getDamageValue(world, x, y, z); + TileEntityForceFieldProjector tileEntityForceFieldProjector = (TileEntityForceFieldProjector)world.getTileEntity(x, y, z); + return tileEntityForceFieldProjector.isDoubleSided ? 1 : 0; + } + @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack itemStack) { super.onBlockPlacedBy(world, x, y, z, entityLiving, itemStack);