Malorolam / LootBags

Other
21 stars 31 forks source link

More of a question, sorry... #153

Closed Shade-Jonezy closed 5 years ago

Shade-Jonezy commented 5 years ago

In the config in the custom loot portion specifically. What is the format accepted for NBT Data? I've been trying to add NBT Data for Immersive Engineering Blueprints and I've had no success. I've got the NBT through both JEI Integration and Infinity Item Editor. No matter how I add it I only get the first blueprint and not the others. They all share the same Meta Data, 0. {blueprint:"bullet"} is one NBT Tag that is a different blueprint, I think.

Malorolam commented 5 years ago

The format is a byte array, you get it with /lootbags_dumphelditem while holding it. If you're doing a lot of these, using lootbags_dumpinventory instead will give all items in your inventory in one go. This will give you a whitelisting entry with default values for minstack, maxstack, and weight you can replace.

Shade-Jonezy commented 5 years ago

Is the entire string necessary? That is a lot of code to paste in the config.

Malorolam commented 5 years ago

Yes, that entire incomprehensible mess of numbers and bars is the byte array conversion minecraft uses to send NBT data in network packets, removing part or changing it makes it not work as intended. If your text editor of choice supports it, turning word wrap off makes things a bit easier to read.

Shade-Jonezy commented 5 years ago

LootBagsInventoryDump.txt

  I still haven't figured out how to get this properly coded into loot bags.  I've put in as is and within brackets.  Although it shows that it the blueprints can be obtained from the loot bags all I get is the same "Electrodes" Blueprint.  I can't figure out where I am going wrong.  May I trouble you as to see where I went wrong.  Here is a sample of how I add them with the brackets:         immersiveengineering:blueprint:0:1:1:20:[31|-117|8|0|0|0|0|0|0|0|-29|98|96|-32|96|-32|76|-54|41|77|45|40|-54|-52|43|97|-32|76|-51|73|77|46|41|-54|79|73|101|0|0|-9|-73|40|-127|27|0|0|0].
Malorolam commented 5 years ago

You just copy it as is with no extra characters. Make sure that the first whitelist entry is on a new line, I noticed with notepad++ it would sometimes show it on a new line but it was actually on the same line as the $STARTWHITELIST command. Tested this myself and they all work fine, although there's something in the IE code that makes the easter egg blueprint happen, but not reliably.

Shade-Jonezy commented 5 years ago

I see so add them without the "[ ]" and use Notepad++ to make sure that I hit enter to place them on different lines?

Shade-Jonezy commented 5 years ago

I could use whatever pointers you can give me to make sure this goes well on my end. Your loot bags mod is awesome by the way.

Malorolam commented 5 years ago

Yes, the code parses based off of lines so each new command, including whitelist or blacklist items, must be on it's own line. Empty lines just add the expected extra read and basic parsing time (insignificant unless your system is extremely old) so don't worry if you put a blank line in by mistake. The wiki pages on github here go over all the bag config commands and syntax as well as have some tutorials for common changes.

Shade-Jonezy commented 5 years ago

From what I can tell they appear to be on new lines. Would you like me to enclose my loot bag config so you could see where I went wrong? In the mean time I will try to figure things out.

Shade-Jonezy commented 5 years ago

Loot_Bags_Config_File.zip

Enclosed in this message is my Config for your Loot Bags Mod. Maybe you can see where I went wrong because I followed every step and all I get is the Electrodes Blueprint. If I am to get full benefits I need all five of the blueprints not just the Electrodes Blueprint.

Malorolam commented 5 years ago

Everything looks fine to me.

Shade-Jonezy commented 5 years ago

Glad to hear everything is set up correctly. Guess I should try different weights and see if that changes anything. Thanks for checking the configuration I sent you. Still a wonderful mod in my opinion.

Shade-Jonezy commented 5 years ago

Sadly nothing changed all I get with or without changing weights is the electrodes blueprint. Not sure what to do really. Getting one blueprint isn't exactly a success. There are five blueprints total with the same meta "0". The one that defaults for the meta tag, the electrodes. "molds", "bullet", a special projectile blueprint and one other I can't think of right now. No matter how I go about it I only get the default for "0", the electrodes.