@@ -309,9 +309,9 @@ public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, Player player) {
309309 if (!veinedBlocks .isEmpty ()) {
310310 //Don't include bonus energy required by efficiency modules when calculating energy of vein mining targets
311311 FloatingLong baseDestroyEnergy = getDestroyEnergy (silk );
312- MekanismUtils .veinMineArea (energyContainer , energyRequired , world , pos , (ServerPlayer ) player , stack , this , veinedBlocks ,
313- hardness -> getDestroyEnergy (modDestroyEnergy , hardness ),
314- ( hardness , distance , bs ) -> getDestroyEnergy ( baseDestroyEnergy , hardness ) .multiply (0.5 * Math .pow (distance , oreTracker . getBoolean ( bs .getBlock () ) ? 1.5 : 2 )));
312+ MekanismUtils .veinMineArea (energyContainer , energyRequired , modDestroyEnergy , baseDestroyEnergy , world , pos , (ServerPlayer ) player , stack , this , veinedBlocks ,
313+ ItemMekaTool :: getDestroyEnergy , ( base , hardness , distance , bs ) -> getDestroyEnergy (base , hardness )
314+ .multiply (0.5 * Math .pow (distance , bs .is ( MekanismTags . Blocks . ATOMIC_DISASSEMBLER_ORE ) ? 1.5 : 2 )));
315315 }
316316 }
317317 }
@@ -322,17 +322,17 @@ private static FloatingLong getDestroyEnergy(boolean silk) {
322322 return silk ? MekanismConfig .gear .mekaToolEnergyUsageSilk .get () : MekanismConfig .gear .mekaToolEnergyUsage .get ();
323323 }
324324
325- public FloatingLong getDestroyEnergy (ItemStack itemStack , float hardness , boolean silk ) {
325+ public static FloatingLong getDestroyEnergy (ItemStack itemStack , float hardness , boolean silk ) {
326326 return getDestroyEnergy (getDestroyEnergy (itemStack , silk ), hardness );
327327 }
328328
329329 private static FloatingLong getDestroyEnergy (FloatingLong baseDestroyEnergy , float hardness ) {
330330 return hardness == 0 ? baseDestroyEnergy .divide (2 ) : baseDestroyEnergy ;
331331 }
332332
333- private FloatingLong getDestroyEnergy (ItemStack itemStack , boolean silk ) {
333+ private static FloatingLong getDestroyEnergy (ItemStack itemStack , boolean silk ) {
334334 FloatingLong destroyEnergy = getDestroyEnergy (silk );
335- IModule <ModuleExcavationEscalationUnit > module = getEnabledModule (itemStack , MekanismModules .EXCAVATION_ESCALATION_UNIT );
335+ IModule <ModuleExcavationEscalationUnit > module = IModuleHelper . INSTANCE . getIfEnabled (itemStack , MekanismModules .EXCAVATION_ESCALATION_UNIT );
336336 float efficiency = module == null ? MekanismConfig .gear .mekaToolBaseEfficiency .get () : module .getCustomInstance ().getEfficiency ();
337337 return destroyEnergy .multiply (efficiency );
338338 }
0 commit comments