After seeing a few packdev friends be really annoyed at how this mod works with NBT, I decided to help them.
Fixes NBT being loaded after loot definitions. In my testing, no loot with NBT actually generated properly, other than the specialcased enchanted equipment. After putting the NBT config read higher, it started to work (and debugger actually showed NBT stuff being called).
Adds a much simpler NBT definition type - CraftTweaker users can use it simply by doing /ct nbt while holding the item and copypasting the result, vanilla command users can do it by using /blockdata <x> <y> <z> {} on a chest with the item and copypasting from the game log. This type is powered by Minecraft's own conversion and it's something many people should be somewhat familiar with already.
I opted to bypass your tokenizer facility for parsing my addition because those strings vanilla Minecraft generates for NBT (they're basically just NBTTagCompound#toString()) use both whitespace and quotes, and I couldn't find a way to elegantly convert back with the method you used.
Also, I considered including a change to the repository structure to this PR to make future contributions easier, but I thought it was too invasive. Please consider moving the repository root to the root of your workspace to include your gradle buildscript and wrapper, so that future contributors only need to clone the repository and set up the Forge workspace, instead of having to set that up themselves and guess what MCP mapping you are using (it's not stable_39 as I discovered today).
After seeing a few packdev friends be really annoyed at how this mod works with NBT, I decided to help them.
/ct nbt
while holding the item and copypasting the result, vanilla command users can do it by using/blockdata <x> <y> <z> {}
on a chest with the item and copypasting from the game log. This type is powered by Minecraft's own conversion and it's something many people should be somewhat familiar with already.I opted to bypass your tokenizer facility for parsing my addition because those strings vanilla Minecraft generates for NBT (they're basically just
NBTTagCompound#toString()
) use both whitespace and quotes, and I couldn't find a way to elegantly convert back with the method you used.Also, I considered including a change to the repository structure to this PR to make future contributions easier, but I thought it was too invasive. Please consider moving the repository root to the root of your workspace to include your gradle buildscript and wrapper, so that future contributors only need to clone the repository and set up the Forge workspace, instead of having to set that up themselves and guess what MCP mapping you are using (it's not
stable_39
as I discovered today).