Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6647

Possible Mapping Issue With NBTTagList / ListTag

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • Tested on Ubuntu and macOS

    •  CraftBukkit version 3180-Spigot-38e6c03-ca0fe5b (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
    • 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?

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              NathanWolf Nathan Wolf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: