mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
fix: drill range
This commit is contained in:
parent
1183a169d8
commit
d36cb9c76e
1 changed files with 3 additions and 6 deletions
|
@ -48,10 +48,7 @@ import net.minecraft.world.level.block.Block;
|
|||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.HitResult;
|
||||
import net.neoforged.neoforge.common.CommonHooks;
|
||||
import net.neoforged.neoforge.common.TierSortingRegistry;
|
||||
import net.neoforged.neoforge.common.ToolAction;
|
||||
import net.neoforged.neoforge.common.ToolActions;
|
||||
import net.neoforged.neoforge.common.*;
|
||||
import net.neoforged.neoforge.items.IItemHandler;
|
||||
import net.neoforged.neoforge.items.IItemHandlerModifiable;
|
||||
|
||||
|
@ -236,7 +233,7 @@ public class DrillItem extends ItemEnergy {
|
|||
}
|
||||
|
||||
//Block hit
|
||||
HitResult ray = WorldUtil.getNearestBlockWithDefaultReachDistance(player.level(), player);
|
||||
HitResult ray = player.pick(8f, 1f, false);
|
||||
if (ray != null && ray.getType() == HitResult.Type.BLOCK) {
|
||||
BlockHitResult trace = (BlockHitResult) ray;
|
||||
//Breaks the Blocks
|
||||
|
@ -412,7 +409,7 @@ public class DrillItem extends ItemEnergy {
|
|||
}
|
||||
if (side.getAxis() == Direction.Axis.X) {
|
||||
xRange = 0;
|
||||
zRange = radius;
|
||||
w zRange = radius;
|
||||
}
|
||||
|
||||
//Not defined later because main Block is getting broken below
|
||||
|
|
Loading…
Reference in a new issue