Implemented transfering between two Solarpanels
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user