mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Propery re-encode registries (#7629)
This commit is contained in:
1 parent
004ab59e6f
commit
7728dde36b
1 file changed
+6
-1
@@ -28,6 +28,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -1350,7 +1351,11 @@ public class ForgeHooks
|
||||
continue;
|
||||
}
|
||||
LOGGER.info("Fixing world: re-injected dimension: " + name);
|
||||
currentList.add(Pair.of(name, Dimension.CODEC.encodeStart(ops, dim).resultOrPartial(s->{}).orElse(ops.empty())));
|
||||
Optional<T> dimT = Dimension.CODEC.encodeStart(WorldGenSettingsExport.create(ops, regs), dim).resultOrPartial(s->{});
|
||||
if (dimT.isPresent())
|
||||
currentList.add(Pair.of(name, dimT.get()));
|
||||
else
|
||||
LOGGER.error("Could not re-encode dimension " + name + ", can not be re-injected.");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user