Compare commits
1 Commits
BauSystem/
...
1.21.1/fix
| Author | SHA1 | Date | |
|---|---|---|---|
| 50c24e68d0 |
@ -20,6 +20,7 @@
|
||||
package de.steamwar.schematicsystem.autocheck;
|
||||
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
@ -96,6 +97,7 @@ public class AutoChecker15 implements AutoChecker.IAutoChecker {
|
||||
|
||||
int counter = 0;
|
||||
for(CompoundTag item : items){
|
||||
System.out.println(item.getValue());
|
||||
if(!item.containsKey("id")){
|
||||
result.getDefunctNbt().add(pos);
|
||||
continue;
|
||||
@ -112,6 +114,14 @@ public class AutoChecker15 implements AutoChecker.IAutoChecker {
|
||||
}
|
||||
if (item.containsKey("tag")) {
|
||||
result.getForbiddenNbt().computeIfAbsent(pos, blockVector3 -> new HashSet<>()).add(itemType);
|
||||
} else if (item.containsKey("components")) {
|
||||
if (item.getValue().get("components") instanceof CompoundTag) {
|
||||
CompoundTag components = (CompoundTag) item.getValue().get("components");
|
||||
if (components.getValue().size() > 1) {
|
||||
result.getForbiddenNbt().computeIfAbsent(pos, blockVector3 -> new HashSet<>()).add(itemType);
|
||||
} else if (components.getValue().size() == 1){
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result.getDispenserItems().put(pos, counter);
|
||||
|
||||
@ -507,6 +507,15 @@ public class WorldEditWrapper14 implements WorldEditWrapper {
|
||||
BlockVector3 offset = BlockVector3.at(offsetX, offsetY, offsetZ);
|
||||
origin = min.subtract(offset);
|
||||
region = new CuboidRegion(min, min.add(width, height, length).subtract(BlockVector3.ONE));
|
||||
} else if (metadataTag != null && metadataTag.containsKey("WorldEdit")){
|
||||
CompoundTag weMeta = requireTag(metadataTag.getValue(), "WorldEdit", CompoundTag.class);
|
||||
int[] off = requireTag(weMeta.getValue(), "Origin", IntArrayTag.class).getValue();
|
||||
if (off.length != 3) {
|
||||
throw new IOException("Invalid offset specified in schematic.");
|
||||
}
|
||||
|
||||
origin = BlockVector3.at(off[0], off[1], off[2]);
|
||||
region = new CuboidRegion(min.add(origin), min.add(origin).add(width, height, length).subtract(BlockVector3.ONE));
|
||||
} else {
|
||||
origin = min;
|
||||
region = new CuboidRegion(origin, origin.add(width, height, length).subtract(BlockVector3.ONE));
|
||||
|
||||
Reference in New Issue
Block a user