[SPIGOT-6647] Possible Mapping Issue With NBTTagList / ListTag Created: 14/Jul/21  Updated: 14/Jul/21  Resolved: 14/Jul/21

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Nathan Wolf Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: 1.17.1
Environment:

Tested on Ubuntu and macOS


Issue Links:
Duplicate
duplicates SPIGOT-6550 Some Spigot mappings are not applied ... Resolved
Version:  CraftBukkit version 3180-Spigot-38e6c03-ca0fe5b (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

I have some schematic-loading code calling CompoundTag.getList, then trying to get an item from the NBT list like so:

CompoundTag nbtData = NbtIo.readCompressed(input);
ListTag entityList = nbtData.getList("Entities", CompatibilityConstants.NBT_TYPE_COMPOUND /* 10 */);
// ...
Tag entity = entityList.get(i);

I get an exception on the last line:

java.lang.NoSuchMethodError: 'net.minecraft.nbt.NBTBase net.minecraft.nbt.NBTTagList.k(int)' 

I am using the remap-spigot and remap-obf config of the specialsource-maven-plugin per the 1.17 release instructions and it seems to work for other NMS calls. I believe I am using the correct remappings for 1.17.1:

<srgIn>org.spigotmc:minecraft-server:1.17.1-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
<remappedDependencies>org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies> 

When I open up my spigot jar and decompile the NBTTagList class file it seems like the get() method is not actually obfuscated, there is indeed no k(int).

public NBTBase get(int var0) {
    return (NBTBase)this.c.get(var0);
} 

Am I doing something wrong or is this somehow mixed up on the mappings?

 


Generated at Tue Apr 22 04:54:50 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.