ModsJava
ReflectedNBTWrapper / NBT Wrapper lib using reflection
Java mod listed for Minecraft 1.7–1.13. Download on the author's site.
⬇ Download on SpigotReflectedNBTWrapper is quite simple library.
It helps you use NBT on all version.
Of course, you can use your own NBT Data.
Custom NBT serializaion / deserializon is work in process.
Example - Create new NBTCompound
Example - Import NBTCompound to Item
Example - Extract NBTCompound from Item
You can download releases with clicking version name.
Download or View source on my Github.
It helps you use NBT on all version.
Of course, you can use your own NBT Data.
Custom NBT serializaion / deserializon is work in process.
Example - Create new NBTCompound
Code (Text):
public static ReflectedNBTCompound createSimpleCompound(){
ReflectedNBTCompound comp = new ReflectedNBTCompound();
comp.setValue("TestValue",1);
return comp;
}
ReflectedNBTCompound comp = new ReflectedNBTCompound();
comp.setValue("TestValue",1);
return comp;
}
Code (Text):
public static ItemStack importTag(ItemStack item){
ReflectedNBTCompound comp = ItemNBTExtrator.extractOrCreateNBT(item);
comp.setValue("TestValue",1);
return ItemNBTImporter.importNBT(item,comp);
}
ReflectedNBTCompound comp = ItemNBTExtrator.extractOrCreateNBT(item);
comp.setValue("TestValue",1);
return ItemNBTImporter.importNBT(item,comp);
}
Code (Text):
public static ReflectedNBTCompound extractAndTest(ItemStack item){
ReflectedNBTCompound comp = ItemNBTExtrator.extractOrCreateNBT(item);
ReflectedNBTInteger ref = comp.getValue("TestValue");
if(ref.getValue() == 1)
System.out.println("Read success");
return comp;
}
ReflectedNBTCompound comp = ItemNBTExtrator.extractOrCreateNBT(item);
ReflectedNBTInteger ref = comp.getValue("TestValue");
if(ref.getValue() == 1)
System.out.println("Read success");
return comp;
}
Spoiler: Version list
1.1.0 Alpha
- Change from extend(ReflectedNBTBase) to implements(IReflectedNBTBase)
- Removed abstraction from ReflectedNBTBase
- Change class file name from ReflectedNBTBase to ReflectedNBTStorage
- Add unwrapping to ReflectedNBTList
- Added IReflectedNBTCompound#get(String)
- Added IReflectedNBTCompound#getNBT(IReflectedNBTBase)
- Added IReflectedNBTCompound#set(String,Object)
- Added IReflectedNBTCompound#set(String,IReflectedNBTBase)
- Change package name to v1_1R1
- Added ReflectedNBTCompound#keyset()
- Now ReflectedNBTList implements Iterable
- Added LinearIterator
- Changed package name to v1_1_R2
- Changed IReflectedNBTCompound implemention to IReflectedNBTBase<HashMap<String,Object>>
- Added IReflectedNBTBase#clear()
- Added IReflectedNBTBase#collapse(IReflectedNBTBase)
- Changed package name to v1_1R3
- Added Native to NBT Exchanger at ReflectedNBTStorage
- Changed package name to v1_2
- Version stabilized! Change version state to Release.
- Now ReflectedNBTStorage#createReflectedNBT(Object) returns parameter if it implements IReflectedNBTWrapper
- Changed package name to v1_2R1
You can download releases with clicking version name.
Download or View source on my Github.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.7, 1.8, 1.9
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
ReflectedNBTWrapper / NBT Wrapper lib using reflection is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 142 times (via Spigot). Download it and open it directly in the game.