mapping
This commit is contained in:
1 parent
3756ca9f86
commit
5dd2a12aa7
20 files changed
+61
-79
No files matched your search
@@ -788,13 +788,13 @@ public class Auxiliary {
|
||||
ListValue.wrap(Registry.FEATURE.getIds().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
);
|
||||
plopData.put(StringValue.of("configured_features"),
|
||||
ListValue.wrap(registryManager.get(Registry.CONFIGURED_FEATURE_WORLDGEN).getIds().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
ListValue.wrap(registryManager.get(Registry.CONFIGURED_FEATURE_KEY).getIds().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
);
|
||||
plopData.put(StringValue.of("structures"),
|
||||
ListValue.wrap(Registry.STRUCTURE_FEATURE.getIds().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
);
|
||||
plopData.put(StringValue.of("configured_structures"),
|
||||
ListValue.wrap(registryManager.get(Registry.CONFIGURED_STRUCTURE_FEATURE_WORLDGEN).getIds().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
ListValue.wrap(registryManager.get(Registry.CONFIGURED_STRUCTURE_FEATURE_KEY).getIds().stream().sorted().map(ValueConversions::of).collect(Collectors.toList()))
|
||||
);
|
||||
Value ret = MapValue.wrap(plopData);
|
||||
return (_c, _t) -> ret;
|
||||
@@ -1188,7 +1188,7 @@ public class Auxiliary {
|
||||
if (!existing_worlds.containsKey(registryKey))
|
||||
{
|
||||
addeds.add(ValueConversions.of(registryKey.getValue()));
|
||||
RegistryKey<World> registryKey2 = RegistryKey.of(Registry.DIMENSION, registryKey.getValue());
|
||||
RegistryKey<World> registryKey2 = RegistryKey.of(Registry.WORLD_KEY, registryKey.getValue());
|
||||
DimensionType dimensionType3 = entry.getValue().getDimensionType();
|
||||
ChunkGenerator chunkGenerator3 = entry.getValue().getChunkGenerator();
|
||||
UnmodifiableLevelProperties unmodifiableLevelProperties = new UnmodifiableLevelProperties(saveProperties, ((ServerWorldInterface) server.getOverworld()).getWorldPropertiesCM());
|
||||
|
||||
@@ -216,10 +216,10 @@ public class BlockIterators {
|
||||
List<Value> neighbours = new ArrayList<>();
|
||||
neighbours.add(new BlockValue(null, world, center.up()));
|
||||
neighbours.add(new BlockValue(null, world, center.down()));
|
||||
neighbours.add(new BlockValue(null, world, center.method_35861())); // north
|
||||
neighbours.add(new BlockValue(null, world, center.method_35859())); // sourh
|
||||
neighbours.add(new BlockValue(null, world, center.method_35855())); // east
|
||||
neighbours.add(new BlockValue(null, world, center.method_35857())); // west
|
||||
neighbours.add(new BlockValue(null, world, center.north()));
|
||||
neighbours.add(new BlockValue(null, world, center.south()));
|
||||
neighbours.add(new BlockValue(null, world, center.east()));
|
||||
neighbours.add(new BlockValue(null, world, center.west()));
|
||||
Value retval = ListValue.wrap(neighbours);
|
||||
return (c_, t_) -> retval;
|
||||
});
|
||||
|
||||
@@ -1307,7 +1307,7 @@ public class WorldAccess {
|
||||
BlockBox box = start.setBoundingBoxFromChildren();
|
||||
structureList.put(
|
||||
new StringValue(NBTSerializableValue.nameFromRegistryId(Registry.STRUCTURE_FEATURE.getId(entry.getKey()))),
|
||||
ListValue.of(ListValue.fromTriple(box.method_35420(), box.method_35415(), box.method_35416()), ListValue.fromTriple(box.method_35417(), box.method_35418(), box.method_35419()))
|
||||
ListValue.of(ListValue.fromTriple(box.getMinX(), box.getMinY(), box.getMinZ()), ListValue.fromTriple(box.getMaxX(), box.getMaxY(), box.getMaxZ()))
|
||||
);
|
||||
}
|
||||
Value ret = MapValue.wrap(structureList);
|
||||
@@ -1357,9 +1357,9 @@ public class WorldAccess {
|
||||
StructureStart<?> start = structures.get(structure);
|
||||
ChunkPos structureChunkPos = start.getPos(); // new ChunkPos(start.getChunkX(), start.getChunkZ());
|
||||
BlockBox box = start.setBoundingBoxFromChildren();
|
||||
for (int chx = box.method_35420() / 16; chx <= box.method_35417() / 16; chx++) // minx maxx
|
||||
for (int chx = box.getMinX() / 16; chx <= box.getMaxX() / 16; chx++) // minx maxx
|
||||
{
|
||||
for (int chz = box.method_35416() / 16; chz <= box.method_35419() / 16; chz++) //minZ maxZ
|
||||
for (int chz = box.getMinZ() / 16; chz <= box.getMaxZ() / 16; chz++) //minZ maxZ
|
||||
{
|
||||
ChunkPos chpos = new ChunkPos(chx, chz);
|
||||
// getting a chunk will convert it to full, allowing to modify references
|
||||
|
||||
Reference in new issue
Block a user