When blocks adjacent to multiblock-capable blocks are updated, (#4474)

do not always recalculate existing multiblocks. Only do so,
if the adjacent block is either part of the multiblock's bounding
box, or if the adjacent block would be a valid part of the multiblock.
This commit is contained in:
shartte
2020-07-18 18:18:24 +02:00
committed by GitHub
parent 4a289470e2
commit 5b3c4aef79
13 changed files with 149 additions and 58 deletions
@@ -32,6 +32,7 @@ import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.client.model.data.IModelData;
import net.minecraftforge.client.model.data.ModelDataMap;
import net.minecraftforge.client.model.data.ModelProperty;
@@ -272,8 +273,8 @@ public class QuantumBridgeTileEntity extends AENetworkInvTileEntity implements I
return AECableType.DENSE_SMART;
}
public void neighborUpdate() {
this.calc.calculateMultiblock(this.world, this.getLocation());
public void neighborUpdate(BlockPos fromPos) {
this.calc.updateMultiblockAfterNeighborUpdate(this.world, this.getLocation(), fromPos);
}
@Override