diff --git a/FABRIC_CHANGELOG.txt b/FABRIC_CHANGELOG.txt index fcfc7b7ac1..75237a80dc 100644 --- a/FABRIC_CHANGELOG.txt +++ b/FABRIC_CHANGELOG.txt @@ -10,3 +10,4 @@ Change logging starts below: - stop the rogue Deployer uprising, for now (#1013) - fix plant-ness not being checked properly in some places (#1032) - fix crash breaking blocks with wand of symmetry (#1048) +- fix performance issues with pipe connections (#935) diff --git a/src/main/java/com/simibubi/create/content/fluids/FlowSource.java b/src/main/java/com/simibubi/create/content/fluids/FlowSource.java index c115118842..0e92c3a9e0 100644 --- a/src/main/java/com/simibubi/create/content/fluids/FlowSource.java +++ b/src/main/java/com/simibubi/create/content/fluids/FlowSource.java @@ -49,14 +49,19 @@ public Storage provideHandler() { public static class FluidHandler extends FlowSource { StorageProvider provider; + private Level level; public FluidHandler(BlockFace location) { super(location); - provider = null; + this.provider = null; + this.level = null; } public void manageSource(Level world) { - provider = StorageProvider.createForFluids(world, location.getConnectedPos()); + if (world != this.level) { + this.level = world; + this.provider = StorageProvider.createForFluids(world, location.getConnectedPos()); + } } @Override