diff --git a/src/main/java/baritone/command/defaults/LitematicaCommand.java b/src/main/java/baritone/command/defaults/LitematicaCommand.java
index eecab07d..bfe0079b 100644
--- a/src/main/java/baritone/command/defaults/LitematicaCommand.java
+++ b/src/main/java/baritone/command/defaults/LitematicaCommand.java
@@ -35,10 +35,10 @@ public class LitematicaCommand extends Command {
@Override
public void execute(String label, IArgConsumer args) throws CommandException {
int schematic = 0;
- if(args.hasAny()) {
+ if (args.hasAny()) {
args.requireMax(1);
if (args.is(Integer.class)) {
- schematic = args.getAs(Integer.class)-1;
+ schematic = args.getAs(Integer.class) - 1;
}
}
try {
diff --git a/src/main/java/baritone/utils/schematic/format/DefaultSchematicFormats.java b/src/main/java/baritone/utils/schematic/format/DefaultSchematicFormats.java
index 2ca9e148..cd38433a 100644
--- a/src/main/java/baritone/utils/schematic/format/DefaultSchematicFormats.java
+++ b/src/main/java/baritone/utils/schematic/format/DefaultSchematicFormats.java
@@ -81,7 +81,7 @@ public enum DefaultSchematicFormats implements ISchematicFormat {
return new LitematicaSchematic(nbt, false);
case 5: //1.13-1.17
case 6: //1.18+
- throw new UnsupportedOperationException("This litematic Verion is to new.");
+ throw new UnsupportedOperationException("This litematic Verion is too new.");
default:
throw new UnsupportedOperationException("Unsuported Version of a Litematica Schematic");
}
diff --git a/src/main/java/baritone/utils/schematic/format/defaults/LitematicaSchematic.java b/src/main/java/baritone/utils/schematic/format/defaults/LitematicaSchematic.java
index dc1c1d5b..84b9b86e 100644
--- a/src/main/java/baritone/utils/schematic/format/defaults/LitematicaSchematic.java
+++ b/src/main/java/baritone/utils/schematic/format/defaults/LitematicaSchematic.java
@@ -32,8 +32,9 @@ import javax.annotation.Nullable;
import java.util.Optional;
/**
- * @author Emerson
- * @since 12/27/2020
+ * Based on EmersonDove's work
+ * ...
+ *
* @author rycbar
* @since 22.09.2022
*/
@@ -43,7 +44,7 @@ public final class LitematicaSchematic extends StaticSchematic {
/**
* @param nbtTagCompound a decompressed file stream aka nbt data.
- * @param rotated if the schematic is rotated by 90° aka x and z size are switched.
+ * @param rotated if the schematic is rotated by 90°.
*/
public LitematicaSchematic(NBTTagCompound nbtTagCompound, boolean rotated) {
this.nbt = nbtTagCompound;
@@ -167,10 +168,10 @@ public final class LitematicaSchematic extends StaticSchematic {
* @return if the current block is part of the subregion.
*/
private static boolean inSubregion(NBTTagCompound nbt, String subReg, int x, int y, int z) {
- return
+ return x >= 0 && y >= 0 && z >= 0 &&
x < Math.abs(nbt.getCompoundTag("Regions").getCompoundTag(subReg).getCompoundTag("Size").getInteger("x")) &&
- y < Math.abs(nbt.getCompoundTag("Regions").getCompoundTag(subReg).getCompoundTag("Size").getInteger("y")) &&
- z < Math.abs(nbt.getCompoundTag("Regions").getCompoundTag(subReg).getCompoundTag("Size").getInteger("z"));
+ y < Math.abs(nbt.getCompoundTag("Regions").getCompoundTag(subReg).getCompoundTag("Size").getInteger("y")) &&
+ z < Math.abs(nbt.getCompoundTag("Regions").getCompoundTag(subReg).getCompoundTag("Size").getInteger("z"));
}
/**
@@ -273,6 +274,7 @@ public final class LitematicaSchematic extends StaticSchematic {
/**
* @author maruohon
* Class from the Litematica mod by maruohon
+ * Usage under LGPLv3 with the permission of the author.
* ...
*/
private static class LitematicaBitArray {