We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12b1a37 commit 5d6ce68Copy full SHA for 5d6ce68
src/main/java/de/srendi/advancedperipherals/common/util/fakeplayer/APFakePlayer.java
@@ -167,10 +167,10 @@ public double getReachRange() {
167
public Pair<Boolean, String> digBlock() {
168
Level world = getLevel();
169
HitResult hit = findHit(true, false);
170
- if (hit.getType() == HitResult.Type.MISS) {
+ if (!(hit instanceof BlockHitResult blockHit) || hit.getType() == HitResult.Type.MISS) {
171
return Pair.of(false, "Nothing to break");
172
}
173
- BlockPos pos = new BlockPos(hit.getLocation());
+ BlockPos pos = blockHit.getBlockPos();
174
BlockState state = world.getBlockState(pos);
175
Block block = state.getBlock();
176
0 commit comments