Skip to content

Commit

Permalink
Improve Component to NBT mapping and fix issues with it
Browse files Browse the repository at this point in the history
  • Loading branch information
UnlikePaladin committed Sep 19, 2024
1 parent afa4f0b commit 44da2c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/src/main/java/org/figuramc/figura/utils/LuaUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ else if (item instanceof String string) {
try {
Level level = WorldAPI.getCurrentWorld();
// Use the DFU only if necessary to convert item nbt -> components

if (string.contains("{")) {
boolean oldLogic = string.contains("{") && string.contains("[") ? string.indexOf("{") < string.indexOf("[") && !string.contains("minecraft:attribute_modifiers"): string.contains("{");
if (oldLogic) {
String tagStr = string.substring(string.indexOf("{"));
CompoundTag nbtItem = new TagParser(new StringReader(tagStr)).readStruct();
CompoundTag tag = new CompoundTag();
Expand Down

0 comments on commit 44da2c5

Please sign in to comment.