mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-20 03:59:36 +00:00
Fix EMT machines dropping wrong items when broken (#116)
This commit is contained in:
2 files changed
+9
-3
No files matched your search
@@ -3,6 +3,7 @@ package emt.block;
|
||||
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 abstract class BlockBaseContainer extends BlockContainer {
|
||||
this.setCreativeTab(EMT.TAB);
|
||||
this.setStepSound(soundType);
|
||||
this.setHardness(hardness);
|
||||
setHarvestLevel("wrench", 1);
|
||||
|
||||
this.countOfMetas = countOfMetas;
|
||||
this.instance = curInstance;
|
||||
@@ -76,7 +78,7 @@ public abstract class BlockBaseContainer extends BlockContainer {
|
||||
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 abstract class BlockBaseContainer extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(EntityPlayer player, int meta) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return meta;
|
||||
|
||||
Reference in new issue
Block a user