merging structures to 1.15

This commit is contained in:
gnembon committed 2020-01-21 01:56:56 -04:00
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 Boolean gridStructure(String name, World world, BlockPos pos)
public static Boolean gridStructure(String name, ServerWorld world, BlockPos pos)
{
if (gridMap.containsKey(name))
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);
}
@Override
public boolean plopAnywhere(ServerWorld world, BlockPos pos, ChunkGenerator<? extends ChunkGeneratorConfig> generator)
@Override
public boolean gridAnywhere(ServerWorld world, BlockPos pos)
{
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())
return false;
@@ -68,10 +68,7 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface
BlockBox box = structurestart.getBoundingBox();
if (!wireOnly)
{
structurestart.generateStructure(
world,
generator,
rand,
structurestart.generateStructure(world, generator, rand,
new BlockBox(
pos.getX() - this.getRadius() * 16,
pos.getZ() - this.getRadius() * 16,
@@ -1481,7 +1481,7 @@ public class CarpetExpression
String structureName = FeatureGenerator.buildingToStructure.get(simpleStructureName);
Value[] result = new Value[]{Value.NULL};
((CarpetContext) c).s.getMinecraftServer().executeSync(() ->
((CarpetContext) c).s.getMinecraftServer().submitAndJoin(() ->
{
Map<String, StructureStart> structures = world.getChunk(pos).getStructureStarts();
if (lv.size() == locator.offset + 1)
@@ -1502,7 +1502,7 @@ public class CarpetExpression
}
StructureStart start = structures.get(structureName);
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 chz = box.minZ / 16; chz <= box.maxZ / 16; chz++)