Force cluster-rebuilds on the first detected change, if their bounds do not match.

Also use a client-side method to update connected textures
for crafting cubes if two previously distinct clusters are connected.
Refactored MBCalculator to use generics for type checks and remove more casts.
This commit is contained in:
Sebastian Hartte
2020-07-19 00:16:33 +02:00
parent 7121426fc9
commit e1f9e01404
12 changed files with 178 additions and 247 deletions
@@ -36,7 +36,6 @@ import appeng.api.features.ILocatable;
import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
import appeng.api.util.AEPartLocation;
import appeng.api.util.WorldCoord;
import appeng.core.AELog;
import appeng.core.Api;
import appeng.me.cache.helpers.ConnectionWrapper;
@@ -58,9 +57,9 @@ public class QuantumCluster implements ILocatable, IAECluster {
private long otherSide;
private QuantumBridgeTileEntity center;
public QuantumCluster(final WorldCoord min, final WorldCoord max) {
this.boundsMin = min.getBlockPos();
this.boundsMax = max.getBlockPos();
public QuantumCluster(final BlockPos min, final BlockPos max) {
this.boundsMin = min.toImmutable();
this.boundsMax = max.toImmutable();
this.setRing(new QuantumBridgeTileEntity[8]);
}