mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-17 13:49:57 +00:00
Make Pair a record
This commit is contained in:
@@ -62,12 +62,12 @@ public final class TerraCLI implements Callable<Integer> {
|
||||
|
||||
if(!noSave) {
|
||||
world.serialize().parallel().forEach(mcaFile -> {
|
||||
Vector2Int pos = mcaFile.getLeft();
|
||||
Vector2Int pos = mcaFile.left();
|
||||
String name = MCAUtil.createNameFromRegionLocation(pos.getX(), pos.getZ());
|
||||
LOGGER.info("Writing region ({}, {}) to {}", pos.getX(), pos.getZ(), name);
|
||||
|
||||
try {
|
||||
MCAUtil.write(mcaFile.getRight(), name);
|
||||
MCAUtil.write(mcaFile.right(), name);
|
||||
} catch(IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -37,15 +37,15 @@ public final class TagUtil {
|
||||
PresetUtil
|
||||
.getPresets()
|
||||
.forEach(pair -> MinecraftUtil
|
||||
.getEntry(registry, pair.getLeft())
|
||||
.getEntry(registry, pair.left())
|
||||
.ifPresentOrElse(
|
||||
preset -> {
|
||||
boolean useExtendedTag = pair.getRight(); // Get the boolean value from the pair
|
||||
boolean useExtendedTag = pair.right(); // Get the boolean value from the pair
|
||||
collect
|
||||
.computeIfAbsent(useExtendedTag ? WorldPresetTags.EXTENDED : WorldPresetTags.NORMAL, tag -> new ArrayList<>())
|
||||
.add(preset);
|
||||
},
|
||||
() -> logger.error("Preset {} does not exist!", pair.getLeft())));
|
||||
() -> logger.error("Preset {} does not exist!", pair.left())));
|
||||
|
||||
registry.startTagReload(new RegistryTags<>(registry.getKey(), collect)).apply();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user