9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-27 02:49:15 +00:00

提升版本号

This commit is contained in:
XiaoMoMi
2025-07-20 02:36:09 +08:00
parent 107622dea0
commit 994ea7fc4d
2 changed files with 7 additions and 6 deletions

View File

@@ -39,16 +39,17 @@ public sealed interface LoreModifier<I> extends ItemDataModifier<I>
static <I> LoreModifier<I> createLoreModifier(Object arg) {
List<Object> rawLoreData = MiscUtils.getAsList(arg, Object.class);
List<String> lore = new ArrayList<>();
String[] rawLore = new String[rawLoreData.size()];
label_all_string_check: {
for (Object o : rawLoreData) {
for (int i = 0; i < rawLore.length; i++) {
Object o = rawLoreData.get(i);
if (o instanceof Map<?,?>) {
break label_all_string_check;
} else {
lore.add(String.valueOf(o));
rawLore[i] = o.toString();
}
}
return new SingleLoreModifier<>(new LoreModification(LoreModification.Operation.APPEND, false, lore.toArray(new String[0])));
return new SingleLoreModifier<>(new LoreModification(LoreModification.Operation.APPEND, false, rawLore));
}
List<LoreModificationHolder> modifications = new ArrayList<>(rawLoreData.size() + 1);