mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
Override stack sensitive isCorrectToolForDrops so it's aware of the current power
This commit is contained in:
parent
a622e497b3
commit
ed8ea0e616
1 changed files with 5 additions and 0 deletions
|
@ -278,6 +278,11 @@ public class DrillItem extends ItemEnergy {
|
||||||
: HARVEST_LEVEL >= 2));
|
: HARVEST_LEVEL >= 2));
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCorrectToolForDrops(ItemStack stack, BlockState state) {
|
||||||
|
return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && super.isCorrectToolForDrops(stack, state);
|
||||||
|
}
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
// public int getHarvestLevel(ItemStack stack, ToolType p_getHarvestLevel_2_, @Nullable Player p_getHarvestLevel_3_, @Nullable BlockState p_getHarvestLevel_4_) {
|
// public int getHarvestLevel(ItemStack stack, ToolType p_getHarvestLevel_2_, @Nullable Player p_getHarvestLevel_3_, @Nullable BlockState p_getHarvestLevel_4_) {
|
||||||
// return HARVEST_LEVEL;
|
// return HARVEST_LEVEL;
|
||||||
|
|
Loading…
Reference in a new issue