mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Fixed a stupid Bug with the Drill not dropping all items. Whoops!
This commit is contained in:
parent
658e0387f9
commit
5336da3cea
2 changed files with 12 additions and 7 deletions
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue