From b098c210ceec39c961196336add627f6da0a8791 Mon Sep 17 00:00:00 2001 From: Julian Krings Date: Fri, 24 Nov 2023 17:03:32 +0100 Subject: [PATCH] removed unnecessary code --- .../iris/engine/jigsaw/PlannedStructure.java | 71 ++----------------- 1 file changed, 6 insertions(+), 65 deletions(-) diff --git a/core/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java b/core/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java index 762534340..81986c252 100644 --- a/core/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java +++ b/core/src/main/java/com/volmit/iris/engine/jigsaw/PlannedStructure.java @@ -74,7 +74,7 @@ public class PlannedStructure { } } - public void place(MantleWriter placer, Mantle e, Engine eng) { + public void place(IObjectPlacer placer, Mantle e, Engine eng) { IrisObjectPlacement options = new IrisObjectPlacement(); options.getRotation().setEnabled(false); int startHeight = pieces.get(0).getPosition().getY(); @@ -84,7 +84,7 @@ public class PlannedStructure { } } - public void place(PlannedPiece i, int startHeight, IrisObjectPlacement o, MantleWriter placer, Mantle e, Engine eng) { + public void place(PlannedPiece i, int startHeight, IrisObjectPlacement o, IObjectPlacer placer, Mantle e, Engine eng) { IrisObjectPlacement options = o; if (i.getPiece().getPlacementOptions() != null) { @@ -122,69 +122,10 @@ public class PlannedStructure { int id = rng.i(0, Integer.MAX_VALUE); JigsawPieceContainer container = JigsawPieceContainer.toContainer(i.getPiece()); - vo.place(xx, height, zz, new IObjectPlacer() { - @Override - public int getHighest(int x, int z, IrisData data) { - return placer.getHighest(x, z, data); - } - - @Override - public int getHighest(int x, int z, IrisData data, boolean ignoreFluid) { - return placer.getHighest(x, z, data, ignoreFluid); - } - - @Override - public void set(int x, int y, int z, BlockData d) { - placer.setData(x, y, z, container); - placer.set(x, y, z, d); - } - - @Override - public BlockData get(int x, int y, int z) { - placer.setData(x, y, z, container); - return placer.get(x, y, z); - } - - @Override - public boolean isPreventingDecay() { - return placer.isPreventingDecay(); - } - - @Override - public boolean isCarved(int x, int y, int z) { - return placer.isCarved(x, y, z); - } - - @Override - public boolean isSolid(int x, int y, int z) { - return placer.isSolid(x, y, z); - } - - @Override - public boolean isUnderwater(int x, int z) { - return placer.isUnderwater(x, z); - } - - @Override - public int getFluidHeight() { - return placer.getFluidHeight(); - } - - @Override - public boolean isDebugSmartBore() { - return placer.isDebugSmartBore(); - } - - @Override - public void setTile(int xx, int yy, int zz, TileData tile) { - placer.setTile(xx, yy, zz, tile); - } - - @Override - public Engine getEngine() { - return placer.getEngine(); - } - }, options, rng, (b, data) -> e.set(b.getX(), b.getY(), b.getZ(), v.getLoadKey() + "@" + id), null, getData()); + vo.place(xx, height, zz, placer, options, rng, (b, data) -> { + e.set(b.getX(), b.getY(), b.getZ(), v.getLoadKey() + "@" + id); + e.set(b.getX(), b.getY(), b.getZ(), container); + }, null, getData()); } public void place(World world) {