diff --git a/platforms/allay/src/main/java/com/dfsek/terra/allay/AllayPlatform.java b/platforms/allay/src/main/java/com/dfsek/terra/allay/AllayPlatform.java index 335c7ddf4..1cd61ae6e 100644 --- a/platforms/allay/src/main/java/com/dfsek/terra/allay/AllayPlatform.java +++ b/platforms/allay/src/main/java/com/dfsek/terra/allay/AllayPlatform.java @@ -38,27 +38,20 @@ public AllayPlatform() { @Override public boolean reload() { getTerraConfig().load(this); - getRawConfigRegistry().clear(); - try { - getRawConfigRegistry().loadAll(this); - - GENERATOR_WRAPPERS.forEach(wrapper -> { - getConfigRegistry().get(wrapper.getConfigPack().getRegistryKey()).ifPresent(pack -> { - wrapper.setConfigPack(pack); - var dimension = wrapper.getAllayWorldGenerator().getDimension(); - TerraAllayPlugin.INSTANCE.getPluginLogger().info( - "Replaced pack in chunk generator for world {}", - dimension.getWorld().getWorldData().getName() + ":" + dimension.getDimensionInfo().dimensionId() - ); - }); + boolean succeed = loadConfigPacks(); + + GENERATOR_WRAPPERS.forEach(wrapper -> { + getConfigRegistry().get(wrapper.getConfigPack().getRegistryKey()).ifPresent(pack -> { + wrapper.setConfigPack(pack); + var dimension = wrapper.getAllayWorldGenerator().getDimension(); + TerraAllayPlugin.INSTANCE.getPluginLogger().info( + "Replaced pack in chunk generator for world {}", + dimension.getWorld().getWorldData().getName() + ":" + dimension.getDimensionInfo().dimensionId() + ); }); - } catch(Exception e) { - TerraAllayPlugin.INSTANCE.getPluginLogger().error("Failed to reload Terra", e); - return false; - } + }); - - return true; + return succeed; } @Override