mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 09:16:34 +00:00
Refactor pack loading
- Combine initial load and reload logic together between each platform implementation - Should prevent pack load errors from blocking other packs from loading.
This commit is contained in:
@@ -20,6 +20,9 @@ package com.dfsek.terra.bukkit;
|
||||
import com.dfsek.tectonic.api.TypeRegistry;
|
||||
import com.dfsek.tectonic.api.depth.DepthTracker;
|
||||
import com.dfsek.tectonic.api.exception.LoadException;
|
||||
|
||||
import com.dfsek.terra.registry.master.ConfigRegistry.PackLoadFailuresException;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -64,13 +67,7 @@ public class PlatformImpl extends AbstractPlatform {
|
||||
@Override
|
||||
public boolean reload() {
|
||||
getTerraConfig().load(this);
|
||||
getRawConfigRegistry().clear();
|
||||
boolean succeed = true;
|
||||
try {
|
||||
getRawConfigRegistry().loadAll(this);
|
||||
} catch(IOException e) {
|
||||
succeed = false;
|
||||
}
|
||||
boolean succeed = loadConfigPacks();
|
||||
|
||||
Bukkit.getWorlds().forEach(world -> {
|
||||
if(world.getGenerator() instanceof BukkitChunkGeneratorWrapper wrapper) {
|
||||
|
||||
Reference in New Issue
Block a user