merging structures to 1.15
This commit is contained in:
1 parent
145bcf1b3c
commit
81e0d733f7
3 files changed
+7
-10
No files matched your search
@@ -134,7 +134,7 @@ public class FeatureGenerator
|
|||||||
}
|
}
|
||||||
public static void noop() {System.out.println("boo");}
|
public static void noop() {System.out.println("boo");}
|
||||||
|
|
||||||
public static Boolean gridStructure(String name, World world, BlockPos pos)
|
public static Boolean gridStructure(String name, ServerWorld world, BlockPos pos)
|
||||||
{
|
{
|
||||||
if (gridMap.containsKey(name))
|
if (gridMap.containsKey(name))
|
||||||
return gridMap.get(name).plop(world, pos);
|
return gridMap.get(name).plop(world, pos);
|
||||||
|
|||||||
@@ -37,15 +37,15 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface
|
|||||||
{
|
{
|
||||||
return plopAnywhere(world, pos, world.getChunkManager().getChunkGenerator(), false);
|
return plopAnywhere(world, pos, world.getChunkManager().getChunkGenerator(), false);
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
public boolean plopAnywhere(ServerWorld world, BlockPos pos, ChunkGenerator<? extends ChunkGeneratorConfig> generator)
|
|
||||||
@Override
|
@Override
|
||||||
public boolean gridAnywhere(ServerWorld world, BlockPos pos)
|
public boolean gridAnywhere(ServerWorld world, BlockPos pos)
|
||||||
{
|
{
|
||||||
return plopAnywhere(world, pos, world.getChunkManager().getChunkGenerator(), true);
|
return plopAnywhere(world, pos, world.getChunkManager().getChunkGenerator(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean plopAnywhere(IWorld world, BlockPos pos, ChunkGenerator<? extends ChunkGeneratorConfig> generator, boolean wireOnly)
|
@Override
|
||||||
|
public boolean plopAnywhere(ServerWorld world, BlockPos pos, ChunkGenerator<? extends ChunkGeneratorConfig> generator, boolean wireOnly)
|
||||||
{
|
{
|
||||||
if (world.isClient())
|
if (world.isClient())
|
||||||
return false;
|
return false;
|
||||||
@@ -68,10 +68,7 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface
|
|||||||
BlockBox box = structurestart.getBoundingBox();
|
BlockBox box = structurestart.getBoundingBox();
|
||||||
if (!wireOnly)
|
if (!wireOnly)
|
||||||
{
|
{
|
||||||
structurestart.generateStructure(
|
structurestart.generateStructure(world, generator, rand,
|
||||||
world,
|
|
||||||
generator,
|
|
||||||
rand,
|
|
||||||
new BlockBox(
|
new BlockBox(
|
||||||
pos.getX() - this.getRadius() * 16,
|
pos.getX() - this.getRadius() * 16,
|
||||||
pos.getZ() - this.getRadius() * 16,
|
pos.getZ() - this.getRadius() * 16,
|
||||||
|
|||||||
@@ -1481,7 +1481,7 @@ public class CarpetExpression
|
|||||||
String structureName = FeatureGenerator.buildingToStructure.get(simpleStructureName);
|
String structureName = FeatureGenerator.buildingToStructure.get(simpleStructureName);
|
||||||
|
|
||||||
Value[] result = new Value[]{Value.NULL};
|
Value[] result = new Value[]{Value.NULL};
|
||||||
((CarpetContext) c).s.getMinecraftServer().executeSync(() ->
|
((CarpetContext) c).s.getMinecraftServer().submitAndJoin(() ->
|
||||||
{
|
{
|
||||||
Map<String, StructureStart> structures = world.getChunk(pos).getStructureStarts();
|
Map<String, StructureStart> structures = world.getChunk(pos).getStructureStarts();
|
||||||
if (lv.size() == locator.offset + 1)
|
if (lv.size() == locator.offset + 1)
|
||||||
@@ -1502,7 +1502,7 @@ public class CarpetExpression
|
|||||||
}
|
}
|
||||||
StructureStart start = structures.get(structureName);
|
StructureStart start = structures.get(structureName);
|
||||||
ChunkPos structureChunkPos = new ChunkPos(start.getChunkX(), start.getChunkZ());
|
ChunkPos structureChunkPos = new ChunkPos(start.getChunkX(), start.getChunkZ());
|
||||||
MutableIntBoundingBox box = start.getBoundingBox();
|
BlockBox box = start.getBoundingBox();
|
||||||
for (int chx = box.minX / 16; chx <= box.maxX / 16; chx++)
|
for (int chx = box.minX / 16; chx <= box.maxX / 16; chx++)
|
||||||
{
|
{
|
||||||
for (int chz = box.minZ / 16; chz <= box.maxZ / 16; chz++)
|
for (int chz = box.minZ / 16; chz <= box.maxZ / 16; chz++)
|
||||||
|
|||||||
Reference in new issue
Block a user