Fixed a stupid Bug with the Drill not dropping all items. Whoops!

This commit is contained in:
Ellpeck 2015-07-08 18:34:20 +02:00
parent 658e0387f9
commit 5336da3cea
2 changed files with 12 additions and 7 deletions

View file

@ -211,6 +211,7 @@ public class ItemCoffee extends ItemFood implements INameableItem{
list.add(StatCollector.translateToLocal(effect.getEffectName())+" "+(effect.getAmplifier()+1)+ " (" + Potion.getDurationString(new PotionEffect(0, effect.getDuration()*20, 0)) + ")");
}
}
//TODO
else list.add("No Effects");
}
else list.add(ItemUtil.shiftForInfo());

View file

@ -222,14 +222,18 @@ public class ItemDrill extends ItemEnergy implements INameableItem{
if(hardness > -1.0F && ((x == xPos && y == yPos && z == zPos) || this.canHarvestBlock(block, stack))){
this.extractEnergy(stack, use, false);
block.harvestBlock(world, player, xPos, yPos, zPos, meta);
if(!EnchantmentHelper.getSilkTouchModifier(player)){
block.dropXpOnBlockBreak(world, x, y, z, block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
}
block.onBlockHarvested(world, xPos, yPos, zPos, meta, player);
if(block.removedByPlayer(world, player, xPos, yPos, zPos, true)){
block.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, meta);
block.harvestBlock(world, player, xPos, yPos, zPos, meta);
world.setBlockToAir(xPos, yPos, zPos);
if(!(xPos == x && yPos == y && zPos == z)){
world.playAuxSFX(2001, xPos, yPos, zPos, Block.getIdFromBlock(block)+(meta << 12));
if(!EnchantmentHelper.getSilkTouchModifier(player)){
block.dropXpOnBlockBreak(world, xPos, yPos, zPos, block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
}
if(!(xPos == x && yPos == y && zPos == z)){
world.playAuxSFX(2001, xPos, yPos, zPos, Block.getIdFromBlock(block)+(meta << 12));
}
}
}
}