Various smaller updates
This commit is contained in:
parent
fdd61262c5
commit
10a9a81725
64 changed files with 372 additions and 276 deletions
|
@ -33,7 +33,7 @@ public class CavePiece extends BasePiece {
|
|||
makeBoundingBox();
|
||||
}
|
||||
|
||||
public CavePiece(StructureManager manager, CompoundTag tag) {
|
||||
public CavePiece(ServerLevel serverLevel, CompoundTag tag) {
|
||||
super(EndStructures.CAVE_PIECE, tag);
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.Random;
|
|||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.StructureFeatureManager;
|
||||
|
@ -32,8 +33,8 @@ public class CrystalMountainPiece extends MountainPiece {
|
|||
top = biome.getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
||||
}
|
||||
|
||||
public CrystalMountainPiece(StructureManager manager, CompoundTag tag) {
|
||||
super(EndStructures.MOUNTAIN_PIECE, manager, tag);
|
||||
public CrystalMountainPiece(ServerLevel serverLevel, CompoundTag tag) {
|
||||
super(EndStructures.MOUNTAIN_PIECE, serverLevel, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -59,7 +59,7 @@ public class LakePiece extends BasePiece {
|
|||
makeBoundingBox();
|
||||
}
|
||||
|
||||
public LakePiece(StructureManager manager, CompoundTag tag) {
|
||||
public LakePiece(ServerLevel serverLevel, CompoundTag tag) {
|
||||
super(EndStructures.LAKE_PIECE, tag);
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public abstract class MountainPiece extends BasePiece {
|
|||
makeBoundingBox();
|
||||
}
|
||||
|
||||
public MountainPiece(StructurePieceType type, StructureManager manager, CompoundTag tag) {
|
||||
public MountainPiece(StructurePieceType type, ServerLevel serverLevel, CompoundTag tag) {
|
||||
super(type, tag);
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
@ -130,9 +130,11 @@ public abstract class MountainPiece extends BasePiece {
|
|||
|
||||
private void makeBoundingBox() {
|
||||
int minX = MHelper.floor(center.getX() - radius);
|
||||
int minY = MHelper.floor(center.getY() - radius);
|
||||
int minZ = MHelper.floor(center.getZ() - radius);
|
||||
int maxX = MHelper.floor(center.getX() + radius + 1);
|
||||
int maxY = MHelper.floor(center.getY() + radius + 1);
|
||||
int maxZ = MHelper.floor(center.getZ() + radius + 1);
|
||||
this.boundingBox = new BoundingBox(minX, minZ, maxX, maxZ);
|
||||
this.boundingBox = new BoundingBox(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class NBTPiece extends BasePiece {
|
|||
makeBoundingBox();
|
||||
}
|
||||
|
||||
public NBTPiece(StructureManager manager, CompoundTag tag) {
|
||||
public NBTPiece(ServerLevel serverLevel, CompoundTag tag) {
|
||||
super(EndStructures.NBT_PIECE, tag);
|
||||
makeBoundingBox();
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ public class PaintedMountainPiece extends MountainPiece {
|
|||
this.slises = slises;
|
||||
}
|
||||
|
||||
public PaintedMountainPiece(StructureManager manager, CompoundTag tag) {
|
||||
super(EndStructures.PAINTED_MOUNTAIN_PIECE, manager, tag);
|
||||
public PaintedMountainPiece(ServerLevel serverLevel, CompoundTag tag) {
|
||||
super(EndStructures.PAINTED_MOUNTAIN_PIECE, serverLevel, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,13 +25,13 @@ public class VoxelPiece extends BasePiece {
|
|||
this.boundingBox = world.getBounds();
|
||||
}
|
||||
|
||||
public VoxelPiece(StructureManager manager, CompoundTag tag) {
|
||||
public VoxelPiece(ServerLevel level, CompoundTag tag) {
|
||||
super(EndStructures.VOXEL_PIECE, tag);
|
||||
this.boundingBox = world.getBounds();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addAdditionalSaveData(ServerLevel serverLevel, CompoundTag compoundTag) {
|
||||
protected void addAdditionalSaveData(ServerLevel serverLevel, CompoundTag tag) {
|
||||
tag.put("world", world.toBNT());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue