mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-08 08:46:21 +00:00
test
This commit is contained in:
@@ -44,6 +44,7 @@ import org.bukkit.util.BlockVector;
|
||||
public class PlannedPiece {
|
||||
private IrisPosition position;
|
||||
private IrisObject object;
|
||||
private IrisObject ogObject;
|
||||
private IrisJigsawPiece piece;
|
||||
private IrisObjectRotation rotation;
|
||||
private IrisData data;
|
||||
@@ -65,10 +66,12 @@ public class PlannedPiece {
|
||||
this.position = position;
|
||||
this.data = piece.getLoader();
|
||||
this.setRotation(rot);
|
||||
this.ogObject = data.getObjectLoader().load(piece.getObject());
|
||||
this.object = structure.rotated(piece, rotation);
|
||||
this.piece = rotation.rotateCopy(piece);
|
||||
this.piece.setLoadKey(piece.getLoadKey());
|
||||
this.object.setLoadKey(piece.getObject());
|
||||
this.ogObject.setLoadKey(piece.getObject());
|
||||
this.connected = new KList<>();
|
||||
}
|
||||
|
||||
@@ -150,11 +153,12 @@ public class PlannedPiece {
|
||||
minY--; //If the dimension has no bedrock, allow it to go a block lower
|
||||
}
|
||||
|
||||
getPiece().getPlacementOptions().getRotation().setEnabled(false);
|
||||
getPiece().getPlacementOptions().setRotation(rotation);
|
||||
int finalMinY = minY;
|
||||
RNG rng = getStructure().getRng().nextParallelRNG(37555);
|
||||
|
||||
// TODO: REAL CLASSES!!!!!!!
|
||||
getObject().place(position.getX() + getObject().getCenter().getBlockX(), position.getY() + getObject().getCenter().getBlockY(), position.getZ() + getObject().getCenter().getBlockZ(), new IObjectPlacer() {
|
||||
getOgObject().place(position.getX() + getObject().getCenter().getBlockX(), position.getY() + getObject().getCenter().getBlockY(), position.getZ() + getObject().getCenter().getBlockZ(), new IObjectPlacer() {
|
||||
@Override
|
||||
public int getHighest(int x, int z, IrisData data) {
|
||||
return position.getY();
|
||||
|
||||
@@ -97,6 +97,7 @@ public class PlannedStructure {
|
||||
options.setMode(i.getPiece().getPlaceMode());
|
||||
}
|
||||
|
||||
IrisObject vo = i.getOgObject();
|
||||
IrisObject v = i.getObject();
|
||||
int sx = (v.getW() / 2);
|
||||
int sz = (v.getD() / 2);
|
||||
@@ -111,7 +112,7 @@ public class PlannedStructure {
|
||||
|
||||
int id = rng.i(0, Integer.MAX_VALUE);
|
||||
|
||||
int h = v.place(xx, height, zz, placer, options, rng, (b) -> {
|
||||
int h = vo.place(xx, height, zz, placer, options, rng, (b) -> {
|
||||
int xf = b.getX();
|
||||
int yf = b.getY();
|
||||
int zf = b.getZ();
|
||||
|
||||
Reference in New Issue
Block a user