Add Items

This commit is contained in:
2025-07-08 17:50:06 +02:00
parent d0414c71f3
commit 50c24e68d0
2 changed files with 19 additions and 0 deletions
@@ -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);