block mirroring and rotation

This commit is contained in:
rycbar0 2022-10-01 22:59:47 +02:00
parent d1930e03e1
commit 3e75cc7408

View File

@ -20,6 +20,7 @@ package baritone.utils.schematic.litematica;
import baritone.utils.schematic.format.defaults.LitematicaSchematic; import baritone.utils.schematic.format.defaults.LitematicaSchematic;
import fi.dy.masa.litematica.Litematica; import fi.dy.masa.litematica.Litematica;
import fi.dy.masa.litematica.data.DataManager; import fi.dy.masa.litematica.data.DataManager;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.Mirror; import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation; import net.minecraft.util.Rotation;
import net.minecraft.util.math.Vec3i; import net.minecraft.util.math.Vec3i;
@ -132,7 +133,8 @@ public final class LitematicaHelper {
} }
//System.out.println(String.format("Turned: %s, sizeX=%S, sizeZ=%s",xyzHolder,schemIn.getX(),schemIn.getZ())); //System.out.println(String.format("Turned: %s, sizeX=%S, sizeZ=%s",xyzHolder,schemIn.getX(),schemIn.getZ()));
} }
tempSchem.setDirect(xyzHolder.getX(), xyzHolder.getY(), xyzHolder.getZ(), schemIn.getDirect(xCounter, yCounter, zCounter)); IBlockState state = schemIn.getDirect(xCounter, yCounter, zCounter).withMirror(LitematicaHelper.getMirror(i)).withRotation(LitematicaHelper.getRotation(i));
tempSchem.setDirect(xyzHolder.getX(), xyzHolder.getY(), xyzHolder.getZ(), state);
} }
} }
} }