Skip to content

Commit dae65fd

Browse files
committed
fix(barrel): Never load chunks on startup
1 parent b27537c commit dae65fd

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

src/main/java/com/dre/brewery/BarrelBody.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import com.google.common.collect.ImmutableMap;
2727
import lombok.Getter;
2828
import lombok.Setter;
29-
import org.bukkit.Bukkit;
3029
import org.bukkit.Material;
3130
import org.bukkit.block.Block;
3231
import org.bukkit.block.data.BlockData;
@@ -118,15 +117,8 @@ public BarrelBody(Block spigot, byte signoffset, BoundingBox bounds) {
118117
this.signoffset = signoffset;
119118
this.bounds = bounds;
120119
if (this.bounds == null || this.bounds.isBad()) {
121-
// If loading from old data, or block locations are missing, or other error, regenerate BoundingBox
122-
// This will only be done in those extreme cases.
123-
124-
// Barrels can be loaded async!
125-
if (Bukkit.isPrimaryThread()) {
126-
this.regenerateBounds();
127-
} else {
128-
BreweryPlugin.getScheduler().runTask(spigot.getLocation(), this::regenerateBounds);
129-
}
120+
// Never load chunks on startup, therefore always scheduled
121+
BreweryPlugin.getScheduler().runTask(spigot.getLocation(), this::regenerateBounds);
130122
}
131123
}
132124

0 commit comments

Comments
 (0)