Some interfaces in net.minecraft.nbt are missing.

Started by EnsurdFrndship on

Topic category: Help with MCreator software

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Some interfaces in net.minecraft.nbt are missing.

Hello,

    I saw several Java code 'examples' for Forge on 'written books' that uses the import net.minecraft.nbt.* interface, but when I copy the code into my project, some of these modules are missing. Some of them are...

    net.minecraft.nbt.NBTTagList

and

    net.minecraft.nbt.NBTTagString

 

   There ARE interfaces in net.minecraft.nbt.*. How do I access them? Thank you. 

 

 

 

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If they are missing, and you…
Thu, 06/04/2020 - 01:40

If they are missing, and you have imported everything. Then it is logical to assume they are not there 🤷‍♂️. Did you compare the Minecraft forge version to yours?

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
   I know those interfaces…
Thu, 06/04/2020 - 02:14

   I know those interfaces aren't there, and am wondering how to get them into wherever directory or location I need them to be in, so I can import them, and why they don't just show up in my 'list' as I am 'importing' in my Java code. According to somebody elses' post, I don't think you can change versions IF you are given the wrong version when you first install MCreator, but how do I compare versions?  

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know those interfaces aren…
Thu, 06/04/2020 - 02:22

I know those interfaces aren't there, and am wondering how to get them into wherever directory or location I need them to be in, so I can import them, and why they don't just show up in my 'list' as I am 'importing' in my Java code. 

I think you are confusing a couple things. You don't move around files. You import files that are there. They don't show up on the list because they are either not in the 'game' any more, or are located at another location. So, you are going to need to research to find A or B.

i.e. EntityPlayer was changed to PlayerEntity

According to somebody elses' post, I don't think you can change versions IF you are given the wrong version when you first install MCreator, but how do I compare versions? 

I think I misphrased that. What I meant was, are you using like 1.15.2 or 1.12.2?

net.minecraft.nbt.NBTTagList…
Thu, 06/04/2020 - 08:26

net.minecraft.nbt.NBTTagList

This does not seem like a recent code.

You can't blindly copy snippets and expect them to work in any Minecraft version you desire.

Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I see. Is there a way to get…
Thu, 06/04/2020 - 12:43

I see. Is there a way to get the right version of Minecraft with the snippets that come with it (for these 2 snippets I mentioned)?