|
|
|
|
@@ -9,25 +9,7 @@
|
|
|
|
|
|
|
|
|
|
protected StructurePiece(WorldGenFeatureStructurePieceType worldgenfeaturestructurepiecetype, int i, StructureBoundingBox structureboundingbox) {
|
|
|
|
|
this.type = worldgenfeaturestructurepiecetype;
|
|
|
|
|
@@ -60,14 +60,11 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public StructurePiece(WorldGenFeatureStructurePieceType worldgenfeaturestructurepiecetype, NBTTagCompound nbttagcompound) {
|
|
|
|
|
- int i = nbttagcompound.getInt("GD");
|
|
|
|
|
- DataResult dataresult = StructureBoundingBox.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("BB"));
|
|
|
|
|
- Logger logger = StructurePiece.LOGGER;
|
|
|
|
|
-
|
|
|
|
|
- Objects.requireNonNull(logger);
|
|
|
|
|
- this(worldgenfeaturestructurepiecetype, i, (StructureBoundingBox) dataresult.resultOrPartial(logger::error).orElseThrow(() -> {
|
|
|
|
|
+ // CraftBukkit start - decompile error
|
|
|
|
|
+ this(worldgenfeaturestructurepiecetype, nbttagcompound.getInt("GD"), (StructureBoundingBox) StructureBoundingBox.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("BB")).resultOrPartial(Objects.requireNonNull(StructurePiece.LOGGER)::error).orElseThrow(() -> {
|
|
|
|
|
return new IllegalArgumentException("Invalid boundingbox");
|
|
|
|
|
}));
|
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
int j = nbttagcompound.getInt("O");
|
|
|
|
|
|
|
|
|
|
this.setOrientation(j == -1 ? null : EnumDirection.from2DDataValue(j));
|
|
|
|
|
@@ -85,13 +82,11 @@
|
|
|
|
|
@@ -80,13 +80,11 @@
|
|
|
|
|
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
|
|
|
|
|
|
|
|
|
nbttagcompound.putString("id", BuiltInRegistries.STRUCTURE_PIECE.getKey(this.getType()).toString());
|
|
|
|
|
@@ -45,7 +27,7 @@
|
|
|
|
|
EnumDirection enumdirection = this.getOrientation();
|
|
|
|
|
|
|
|
|
|
nbttagcompound.putInt("O", enumdirection == null ? -1 : enumdirection.get2DDataValue());
|
|
|
|
|
@@ -191,6 +186,11 @@
|
|
|
|
|
@@ -186,6 +184,11 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
generatoraccessseed.setBlock(blockposition_mutableblockposition, iblockdata, 2);
|
|
|
|
|
@@ -57,7 +39,7 @@
|
|
|
|
|
Fluid fluid = generatoraccessseed.getFluidState(blockposition_mutableblockposition);
|
|
|
|
|
|
|
|
|
|
if (!fluid.isEmpty()) {
|
|
|
|
|
@@ -205,6 +205,38 @@
|
|
|
|
|
@@ -200,6 +203,38 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -96,7 +78,7 @@
|
|
|
|
|
protected boolean canBeReplaced(IWorldReader iworldreader, int i, int j, int k, StructureBoundingBox structureboundingbox) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
@@ -398,12 +430,20 @@
|
|
|
|
|
@@ -393,12 +428,20 @@
|
|
|
|
|
iblockdata = reorient(worldaccess, blockposition, Blocks.CHEST.defaultBlockState());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -117,7 +99,7 @@
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
@@ -415,12 +455,31 @@
|
|
|
|
|
@@ -410,12 +453,31 @@
|
|
|
|
|
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = this.getWorldPos(i, j, k);
|
|
|
|
|
|
|
|
|
|
if (structureboundingbox.isInside(blockposition_mutableblockposition) && !generatoraccessseed.getBlockState(blockposition_mutableblockposition).is(Blocks.DISPENSER)) {
|
|
|
|
|
@@ -149,7 +131,7 @@
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
@@ -433,7 +492,7 @@
|
|
|
|
|
@@ -428,7 +490,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static StructureBoundingBox createBoundingBox(Stream<StructurePiece> stream) {
|
|
|
|
|
|