Merge branch 'master' into 1.15

# Conflicts:
#	src/main/java/carpet/fakes/StructureFeatureInterface.java
#	src/main/java/carpet/helpers/FeatureGenerator.java
#	src/main/java/carpet/mixins/StructureFeatureMixin.java
This commit is contained in:
gnembon committed 2020-01-21 01:43:53 -04:00
commit 145bcf1b3c
4 files changed
+181 -24

No files matched your search

@@ -35,10 +35,17 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface
@Override
public boolean plopAnywhere(ServerWorld world, BlockPos pos)
{
return plopAnywhere(world, pos, world.getChunkManager().getChunkGenerator());
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)
{
if (world.isClient())
return false;
@@ -50,7 +57,7 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface
int k = pos.getZ() >> 4;
long chId = ChunkPos.toLong(j, k);
StructureStart structurestart = forceStructureStart(world, generator, rand, chId);
if (structurestart == null || structurestart == StructureStart.DEFAULT)
if (structurestart == StructureStart.DEFAULT)
{
return false;
}
@@ -59,17 +66,20 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface
world.getChunk(j, k).addStructureReference(this.getName(), chId); //, ChunkStatus.STRUCTURE_STARTS
BlockBox box = structurestart.getBoundingBox();
structurestart.generateStructure(
world,
generator,
if (!wireOnly)
{
structurestart.generateStructure(
world,
generator,
rand,
new BlockBox(
pos.getX() - this.getRadius()*16,
pos.getZ() - this.getRadius()*16,
pos.getX() + (this.getRadius()+1)*16,
pos.getZ() + (1+this.getRadius())*16),
new ChunkPos(j, k)
);
pos.getX() - this.getRadius() * 16,
pos.getZ() - this.getRadius() * 16,
pos.getX() + (this.getRadius() + 1) * 16,
pos.getZ() + (1 + this.getRadius()) * 16),
new ChunkPos(j, k)
);
}
//structurestart.notifyPostProcessAt(new ChunkPos(j, k));
int i = getRadius();