fix selective tnt getting wrong block

This commit is contained in:
Jenny committed 2025-01-30 00:17:53 +01:00
1 parent 1a05c6034a
commit 73acc066f2
2 files changed
+3 -3

No files matched your search

@@ -43,11 +43,11 @@ public class selectivePrimedTNT extends basePrimedTNT {
}
public String getBlock() {
return level().getBlockState(new BlockPos((int) getX(), (int) getY() - 1, (int) getZ())).getBlock().toString();
return renderBlock().toString();
}
@Override
public Block renderBlock() {
return level().getBlockState(new BlockPos((int) getX(), (int) getY() - 1, (int) getZ())).getBlock();
return level().getBlockState(new BlockPos((int) Math.floor(getX()), (int) Math.floor(getY()) - 1, (int) Math.floor(getZ()))).getBlock();
}
}