mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +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)) + ")");
|
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("No Effects");
|
||||||
}
|
}
|
||||||
else list.add(ItemUtil.shiftForInfo());
|
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))){
|
if(hardness > -1.0F && ((x == xPos && y == yPos && z == zPos) || this.canHarvestBlock(block, stack))){
|
||||||
this.extractEnergy(stack, use, false);
|
this.extractEnergy(stack, use, false);
|
||||||
|
|
||||||
block.harvestBlock(world, player, xPos, yPos, zPos, meta);
|
block.onBlockHarvested(world, xPos, yPos, zPos, meta, player);
|
||||||
if(!EnchantmentHelper.getSilkTouchModifier(player)){
|
if(block.removedByPlayer(world, player, xPos, yPos, zPos, true)){
|
||||||
block.dropXpOnBlockBreak(world, x, y, z, block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
|
block.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, meta);
|
||||||
}
|
block.harvestBlock(world, player, xPos, yPos, zPos, meta);
|
||||||
|
|
||||||
world.setBlockToAir(xPos, yPos, zPos);
|
if(!EnchantmentHelper.getSilkTouchModifier(player)){
|
||||||
if(!(xPos == x && yPos == y && zPos == z)){
|
block.dropXpOnBlockBreak(world, xPos, yPos, zPos, block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
|
||||||
world.playAuxSFX(2001, xPos, yPos, zPos, Block.getIdFromBlock(block)+(meta << 12));
|
}
|
||||||
|
|
||||||
|
if(!(xPos == x && yPos == y && zPos == z)){
|
||||||
|
world.playAuxSFX(2001, xPos, yPos, zPos, Block.getIdFromBlock(block)+(meta << 12));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue