Skip to content

Commit

Permalink
Use damageDropped to determine meta of dropped block for smelting rec…
Browse files Browse the repository at this point in the history
…ipies with autosmelt. #947
  • Loading branch information
bonii-xx committed Sep 3, 2014
1 parent da3c596 commit 431e149
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/tconstruct/tools/TActiveOmniMod.java
Expand Up @@ -66,11 +66,13 @@ public boolean beforeBlockBreak (ToolCore tool, ItemStack stack, int x, int y, i
private boolean autoSmelt(ToolCore tool, NBTTagCompound tags, ItemStack stack, int x, int y, int z, EntityLivingBase entity)
{
World world = entity.worldObj;
int meta = world.getBlockMetadata(x, y, z);
Block block = world.getBlock(x, y, z);
if (block == null)
return false;

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

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

0 comments on commit 431e149

Please sign in to comment.