mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-04 00:45:57 +00:00
dont set failed pack
This commit is contained in:
parent
e72669354a
commit
1801c831ba
@ -81,6 +81,7 @@ public class PlatformImpl extends AbstractPlatform {
|
|||||||
getRawConfigRegistry().clear();
|
getRawConfigRegistry().clear();
|
||||||
boolean succeed = getRawConfigRegistry().loadAll(this);
|
boolean succeed = getRawConfigRegistry().loadAll(this);
|
||||||
|
|
||||||
|
|
||||||
if(server != null) {
|
if(server != null) {
|
||||||
server.reloadResources(server.getDataPackManager().getNames()).exceptionally(throwable -> {
|
server.reloadResources(server.getDataPackManager().getNames()).exceptionally(throwable -> {
|
||||||
LOGGER.warn("Failed to execute reload", throwable);
|
LOGGER.warn("Failed to execute reload", throwable);
|
||||||
@ -88,10 +89,12 @@ public class PlatformImpl extends AbstractPlatform {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
worlds.forEach(world -> {
|
worlds.forEach(world -> {
|
||||||
FabricChunkGeneratorWrapper chunkGeneratorWrapper = ((FabricChunkGeneratorWrapper) world.getChunkManager().getChunkGenerator());
|
FabricChunkGeneratorWrapper chunkGeneratorWrapper = ((FabricChunkGeneratorWrapper) world.getChunkManager().getChunkGenerator());
|
||||||
chunkGeneratorWrapper.setPack(getConfigRegistry().get(chunkGeneratorWrapper.getPack().getRegistryKey()).orElseThrow());
|
getConfigRegistry().get(chunkGeneratorWrapper.getPack().getRegistryKey()).ifPresent(pack -> {
|
||||||
|
chunkGeneratorWrapper.setPack(pack);
|
||||||
|
LOGGER.info("Replaced pack in chunk generator for world {}", world);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return succeed;
|
return succeed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user