Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main/java/emt/block/BlockBaseContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/emt/block/BlockMachines.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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
Expand Down
Loading