From 33e702b2ca096dce5232f3a86509972a63ede7b9 Mon Sep 17 00:00:00 2001 From: LatvianModder Date: Fri, 20 Oct 2023 13:57:16 +0300 Subject: [PATCH] Added bulk option for painter --- .../kubejs/client/painter/PainterObjectStorage.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/src/main/java/dev/latvian/mods/kubejs/client/painter/PainterObjectStorage.java b/common/src/main/java/dev/latvian/mods/kubejs/client/painter/PainterObjectStorage.java index 742443cf3..d4c81cb03 100644 --- a/common/src/main/java/dev/latvian/mods/kubejs/client/painter/PainterObjectStorage.java +++ b/common/src/main/java/dev/latvian/mods/kubejs/client/painter/PainterObjectStorage.java @@ -32,6 +32,16 @@ public Collection getObjects() { } public void handle(CompoundTag root) { + if (root.contains("bulk")) { + var bulk = root.getList("bulk", Tag.TAG_COMPOUND); + + for (int i = 0; i < bulk.size(); i++) { + handle(bulk.getCompound(i)); + } + + return; + } + for (var key : root.getAllKeys()) { var tag = root.getCompound(key);