Skip to content

Commit e7de576

Browse files
authored
fix: corriger la profondeur du Hammer (3x3x3 → 3x3x2) (#1217)
1 parent 53688e6 commit e7de576

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

  • src/main/java/fr/openmc/core/registry/items/contents

src/main/java/fr/openmc/core/registry/items/contents/Hammer.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ private static BlockFace getTargetFace(Player player) {
3636

3737
private static Vector rotateOffset(int x, int y, int z, BlockFace face) {
3838
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);
39+
case SOUTH -> new Vector(x, y, z);
40+
case NORTH -> new Vector(x, y, -z);
41+
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);
4245
default -> new Vector(0, 0, 0);
4346
};
4447
}
@@ -51,7 +54,7 @@ private void breakArea(Player player, Block origin, BlockFace face, ItemStack to
5154

5255
for (int dx = -radius; dx <= radius; dx++) {
5356
for (int dy = -radius; dy <= radius; dy++) {
54-
for (int dz = -depth; dz <= depth; dz++) {
57+
for (int dz = 0; dz <= depth; dz++) {
5558

5659
if (dx == 0 && dy == 0 && dz == 0) continue;
5760

0 commit comments

Comments
 (0)