SteamWar/BauSystem2.0
Archiviert
12
0

Fix DepthCounter

Dieser Commit ist enthalten in:
yoyosource 2021-05-01 15:21:34 +02:00
Ursprung 36522081e3
Commit 22e29e0cdc

Datei anzeigen

@ -37,7 +37,7 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.function.BinaryOperator; import java.util.function.DoubleBinaryOperator;
@Linked(LinkageType.LISTENER) @Linked(LinkageType.LISTENER)
public class DepthCounter implements Listener { public class DepthCounter implements Listener {
@ -100,10 +100,10 @@ public class DepthCounter implements Listener {
return new Vector(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ()); return new Vector(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ());
} }
private void compute(Vector v1, Vector v2, BinaryOperator<Double> function) { private void compute(Vector v1, Vector v2, DoubleBinaryOperator function) {
v1.setX(function.apply(v1.getX(), v2.getX())); v1.setX(function.applyAsDouble(v1.getX(), v2.getX()));
v1.setY(function.apply(v1.getY(), v2.getY())); v1.setY(function.applyAsDouble(v1.getY(), v2.getY()));
v1.setZ(function.apply(v1.getZ(), v2.getZ())); v1.setZ(function.applyAsDouble(v1.getZ(), v2.getZ()));
} }
} }