Skip to content

Commit 264a6e1

Browse files
committed
hotfix: Conduit legacy data conversion causing deadlock during world load
Fixes: GH-1140
1 parent e069441 commit 264a6e1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

enderio-conduits/src/main/java/com/enderio/conduits/common/conduit/bundle/ConduitBundleBlockEntity.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ public final class ConduitBundleBlockEntity extends EnderBlockEntity
136136
@Nullable
137137
public Direction primaryConnectionSide;
138138

139+
// TODO: Temporary fix for GH-1140
140+
private boolean isLoading = false;
141+
139142
public ConduitBundleBlockEntity(BlockPos worldPosition, BlockState blockState) {
140143
super(ConduitBlockEntities.CONDUIT.get(), worldPosition, blockState);
141144
}
@@ -194,6 +197,10 @@ public void onLoad() {
194197
* Fire all relevant updates when the conduits or connections change.
195198
*/
196199
private void bundleChanged() {
200+
if (isLoading) {
201+
return;
202+
}
203+
197204
level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_ALL);
198205
level.updateNeighborsAt(getBlockPos(), getBlockState().getBlock());
199206
level.invalidateCapabilities(getBlockPos());
@@ -1198,7 +1205,9 @@ public void setLevel(Level level) {
11981205

11991206
// TODO: Do this in clear removed instead?
12001207
if (!level.isClientSide()) {
1208+
isLoading = true;
12011209
loadFromSavedData();
1210+
isLoading = false;
12021211
}
12031212
}
12041213

0 commit comments

Comments
 (0)