Stubborn class

Discussion in 'Plugin Development' started by Techy4198, Mar 23, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Techy4198

    Hi. I'm trying to update MaterialAPI to work with 1.7 for my own purposes, and i have successfully updated 99.9% of it. There is, however, a single stubborn class which gives no errors in Eclipse, but throws about 100 errors when running.

    The old class can be found here:
    https://github.com/Cybermaxke/NbtUt...va/me/cybermaxke/nbtutils/NbtUnwrapUtils.java

    could someone please try update this to work with 1.7 for me? it's the reflection parts which are the issue. tons of field and method names have changed or even been moved to other classes, and i'm no good with reflection stuff.
     
  2. Offline

    Techy4198

    bump
    this. is. kinda. urgent.
     
  3. Offline

    DrEinsteinium

    Techy4198 If you know what the problem is and you're asking for someone else to fix it then that most likely won't get you anything. Perhaps you can look into the problem yourself and post any questions you have on reflection here. Google is also a good source of help for reflection too. It's how I learned how to use it :)
     
  4. Offline

    Techy4198

    DrEinsteinium i need to know what all the method/field names have changed to from 1.6 to 1.7.
    the lines causing the issues are:
    Code:
    294: return cast.cast(tag.getClass().getField("data").get(tag));
    298: return cast.cast(tag.getClass().getField("map").get(tag));
    300: return cast.cast(tag.getClass().getField("list").get(tag));
     
  5. Offline

    Minnymin3

    Look on the net.minecraft.server git (Server 1.7.2 SRC) and find the class that is being called upon and check out the new method/field names.
     
    Mattkx4 likes this.
  6. Offline

    Techy4198

    Minnymin3 thanks, the class in question is net.minecraft.server.NBTTagCompound.
    i need to find out how to get the name of an instance of a NBTTagCompound, as it seems the name is no longer stored in the instance of the class itself. when i say name, i don't mean the type, such as END, BYTE, etc, i mean the actual saved name of the tag when in a file, for example in a player.dat file there is a tag, i believe an integer, called Health. it's the 'Health' that i need to get.
     
  7. Offline

    Techy4198

    bumpity bump.
     
  8. Offline

    Minnymin3

    Techy4198
    I don't think thats the purpose of this class. This class just wraps and unwraps tags.
     
  9. Offline

    Techy4198

    Minnymin3 you talkin about NBTUnwrapUtils? cos the class DOES infact have a method for getting the name of a tag, which i assume is required for the thing to work properly, but the reflection part of it only works in 1.6 and possibly below, i havent tested fully.
     
  10. Offline

    Techy4198

Thread Status:
Not open for further replies.

Share This Page