We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53688e6 commit e7de576Copy full SHA for e7de576
1 file changed
src/main/java/fr/openmc/core/registry/items/contents/Hammer.java
@@ -36,9 +36,12 @@ private static BlockFace getTargetFace(Player player) {
36
37
private static Vector rotateOffset(int x, int y, int z, BlockFace face) {
38
return switch (face) {
39
- case NORTH, SOUTH -> new Vector(x, y, z);
40
- case EAST, WEST -> new Vector(z, y, x);
41
- case UP, DOWN -> new Vector(x, z, y);
+ case SOUTH -> new Vector(x, y, z);
+ case NORTH -> new Vector(x, y, -z);
+ case EAST -> new Vector(z, y, x);
42
+ case WEST -> new Vector(-z, y, x);
43
+ case UP -> new Vector(x, z, y);
44
+ case DOWN -> new Vector(x, -z, y);
45
default -> new Vector(0, 0, 0);
46
};
47
}
@@ -51,7 +54,7 @@ private void breakArea(Player player, Block origin, BlockFace face, ItemStack to
51
54
52
55
for (int dx = -radius; dx <= radius; dx++) {
53
56
for (int dy = -radius; dy <= radius; dy++) {
- for (int dz = -depth; dz <= depth; dz++) {
57
+ for (int dz = 0; dz <= depth; dz++) {
58
59
if (dx == 0 && dy == 0 && dz == 0) continue;
60
0 commit comments