Using NBT class

How do i use the net.mincraft. classes with my sponge plugin?

I currently use maven and my IDE is eclipse.


Why do you want to use NBT? Sponge abstracts away NBT. If you need NBT to load other stuff, (a NBT file for example), either look for the DataTranslators (think that’s what they’re called), or use an external library.

I want to interact with the pixelmon mod and i need the net.minecraft.nbt classes aswell as the net.minecraft.server class :confused: I’ve seen other sponge plugins somehow do this and i’d like to know where i can import these classes from

If you need to interact with Forge mods you need to add both the mod and spongeforge to your dependencies.

i did but i still couldn’t import the NBTTagCompund class

You need to setup a forge development environment, then add spongeforge and any other mods to it.
Forge Documentation: Home - Forge Documentation