diff --git a/src/main/java/emt/block/BlockBaseContainer.java b/src/main/java/emt/block/BlockBaseContainer.java index 6b3fb6e2..82db8acb 100644 --- a/src/main/java/emt/block/BlockBaseContainer.java +++ b/src/main/java/emt/block/BlockBaseContainer.java @@ -3,6 +3,7 @@ import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; @@ -40,6 +41,7 @@ public BlockBaseContainer(String unlocName, Material material, SoundType soundTy this.setCreativeTab(EMT.TAB); this.setStepSound(soundType); this.setHardness(hardness); + setHarvestLevel("wrench", 1); this.countOfMetas = countOfMetas; this.instance = curInstance; @@ -76,7 +78,7 @@ public IIcon getIcon(IBlockAccess access, int x, int y, int z, int side) { return set.bottom; } else if (side == 1) { return set.top; - } else if (side != tile.facing) { + } else if (tile == null || side != tile.facing) { return set.side; } else if (tile.isOn) { if (set.frontOn != null) { @@ -143,6 +145,11 @@ public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase e } } + @Override + public boolean canHarvestBlock(EntityPlayer player, int meta) { + return true; + } + @Override public int damageDropped(int meta) { return meta; diff --git a/src/main/java/emt/block/BlockMachines.java b/src/main/java/emt/block/BlockMachines.java index c0bc2c1f..76b99f11 100644 --- a/src/main/java/emt/block/BlockMachines.java +++ b/src/main/java/emt/block/BlockMachines.java @@ -23,7 +23,6 @@ import emt.EMT; import emt.tile.TileEntityEtherealMacerator; import emt.tile.TileEntityIndustrialWandRecharge; -import ic2.api.item.IC2Items; public class BlockMachines extends BlockBaseContainer { @@ -90,7 +89,7 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p @Override public Item getItemDropped(int meta, Random random, int fortune) { - return IC2Items.getItem("machine").getItem(); + return Item.getItemFromBlock(this); } @Override