ReflectedNBTWrapper 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
public static ReflectedNBTCompound createSimpleCompound(){
ReflectedNBTCompound comp = new ReflectedNBTCompound();
comp.setValue("TestValue",1);
return comp;
}
Example - Import NBTCompound to Item
public static ItemStack importTag(ItemStack item){
ReflectedNBTCompound comp = ItemNBTExtrator.extractOrCreateNBT(item);
comp.setValue("TestValue",1);
return ItemNBTImporter.importNBT(item,comp);
}
Example - Extract NBTCompound from Item
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;
}
Version list
- 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.
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta