Implemented transfering between two Solarpanels

This commit is contained in:
2026-02-07 01:58:54 +01:00
parent 486254b6dd
commit 75900d50f9
7 changed files with 58 additions and 30 deletions

View File

@@ -2,11 +2,16 @@ package org.KaiFlo.SolarCell.Helpers;
public class BlockHelper {
public static void executeForCubeAround(int x, int y, int z, int size, Callback callback) {
public static void executeForCubeAround(int x, int y, int z, int size, boolean own, Callback callback) {
for (int x1 = x - size / 2; x1 < x + size / 2; x1++) {
for (int y1 = y - size / 2; y1 < y + size / 2; y1++) {
for (int z1 = z - size / 2; z1 < z + size / 2; z1++) {
callback.accept(x1, y1, z1);
if (!(x1 == x && y1 == y && z1 == z)) {
callback.accept(x1, y1, z1);
}
else if (own) {
callback.accept(x1, y1, z1);
}
}
}
}