Skip to content

Commit 043435a

Browse files
Machine-MakerMiniDigger
authored andcommitted
restore naming nbt collections by their concrete type rather than 'list'
1 parent 1ed5340 commit 043435a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

codebook-lvt/src/main/java/io/papermc/codebook/lvt/LvtTypeSuggester.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ private String suggestNameFromClassType(final ClassType type) throws IOException
102102
}
103103

104104
// TODO Try to determine name from signature, rather than just descriptor
105-
final @Nullable ClassData typeClass = context.getContextProvider().findClass(type);
105+
final @Nullable ClassData typeClass = this.context.getContextProvider().findClass(type);
106106
if (typeClass != null) {
107-
if (typeClass.doesExtendOrImplement(this.listClass)) {
107+
if (typeClass.doesExtendOrImplement(this.listClass) && !typeClass.name().startsWith("net/minecraft/nbt/")) { // exclude nbt lists
108108
return "list";
109109
} else if (typeClass.doesExtendOrImplement(this.setClass)) {
110110
return "set";

0 commit comments

Comments
 (0)