Skip to content

Commit

Permalink
Fix autosmelt smelting even if the black can't be harvested with the …
Browse files Browse the repository at this point in the history
…tool #1053
  • Loading branch information
bonii-xx committed Oct 5, 2014
1 parent 89796fd commit 0430391
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/tconstruct/tools/TActiveOmniMod.java
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import tconstruct.library.ActiveToolMod;
import tconstruct.library.tools.*;
import tconstruct.util.config.PHConstruct;
Expand Down Expand Up @@ -63,6 +64,10 @@ private boolean autoSmelt (ToolCore tool, NBTTagCompound tags, ItemStack stack,
return false;

int meta = world.getBlockMetadata(x, y, z);

if(!block.getMaterial().isToolNotRequired() && !ForgeHooks.canToolHarvestBlock(block, meta, stack))
return false;

meta = block.damageDropped(meta);

if (tags.getBoolean("Lava") && block.quantityDropped(meta, 0, random) != 0)
Expand Down

0 comments on commit 0430391

Please sign in to comment.