Module talk:LootChest

Golden Apple in the Igloo
We may need some special thing that accounts for whatever shenanigans they are pulling that adds Golden Apples to Igloo chests, whenever we figure out exactly what is going on. – Sealbudsman talk/contr 00:55, 22 October 2015 (UTC)
 * FYI, the "update (correct?)" was an update, not a correction. I re-confirmed that the module before your edits was correct for 15w42a and at least the bits you changed are correct for 15w43a. Anomie x (talk) 05:40, 22 October 2015 (UTC)
 * Thanks for double checking, that's great. – Sealbudsman talk/contr 12:51, 22 October 2015 (UTC)


 * The golden apple is not in the igloo loot table, making me assume the golden apple is added before the loot chest is loaded, meaning it will almost always be added in the center slot, but then could rarely be overwritten by another item. – KnightMiner  t/c 14:33, 22 October 2015 (UTC)
 * I tend to agree., based on your explanation at Talk:Igloo, would you say that's accurate enough?  Or based on your comment about it being buggy, do you think more is going on?  – Sealbudsman talk/contr 14:42, 22 October 2015 (UTC)
 * It was accurate enough. Specifically, the golden apple is included in the NBT data when the chest is placed from igloo_bottom.nbt, exactly like if you used /setblock. The buggy part is that saving loses the golden apple, so it gets lost if the chunk is ever unloaded before you open the chest.
 * Looking at 15w43b, though, they got rid of the buggy placement in favor of it actually being in the loot table. Anomie x (talk) 15:04, 22 October 2015 (UTC)
 * Note the loot table for igloo chests is now "2–8 from the list, plus one golden apple always", the apple isn't included in the 2–8. Anomie x (talk) 15:44, 22 October 2015 (UTC)
 * Ah, that's great. Yeah they added a second pool with the apple, after the 2–8 pool. Good solution. – Sealbudsman talk/contr 16:30, 22 October 2015 (UTC)

Multiple pools
So as of 15w44a, the abandoned mineshaft, desert pyramid, simple dungeon and bonus chests all use multiple pools. I suppose that's on my to-do list.. until multiple pools are implemented, those chests and the items in them can't be in any way accurate. Side note; showing 'weight' on the charts is becoming less and less useful I think. – Sealbudsman talk/contr 15:50, 28 October 2015 (UTC)
 * All set. – Sealbudsman talk/contr 14:30, 29 October 2015 (UTC)

Igloo loot table is empty
At Chest loot, the Igloo column shows no items. Is this because it's incorrectly included in the main section rather than the "Upcoming" section? Seahen (talk) 05:00, 10 November 2015 (UTC)


 * . – Sealbudsman talk/contr 16:46, 10 November 2015 (UTC)


 * Good call,, your edit fixed the all-columns, all-chests variant. I agree with removing allRollsSpan, because I think you're right, its entire purpose is to factor in the empty columns, whereas the entire purpose of this edit was to hide them. – Sealbudsman talk/contr 17:29, 10 November 2015 (UTC)


 * Since the only case they are needed now is for broken data (which should be fixed anyways), I say they can be safely removed. Though from a quick test I've noticed the third creation of the variable allRollsSpan does actually get "0" values. Since I am not exactly sure what it is doing there (in loop ), I don't have much to say on that one. The other two definings of allRollsSpan get only 1 or higher, so they should be safe to remove. – KnightMiner  t/c 17:54, 10 November 2015 (UTC)

Feature request idea
In the big table, enchanted books are split into two lines, showing far apart, due to separate notes. This is probably fine, but ideally the initial sort ought to put them next to one another (somehow), and generally for any such other future split item. It took me several minutes to figure out why the first Ench book entry was not showing all chest entries; it wasn't obvious where the other entries were. I'll take a look if nobody does within a few days. – Sealbudsman talk/contr 19:07, 5 March 2016 (UTC)
 * In the interest of not adding too much more complexity, I'm going to just leave it, because someone can just sort the table by name if they want similar names to group together as I'd described. – Sealbudsman talk/contr 17:45, 6 January 2017 (UTC)

Suggestions
–Majr ᐸ Talk Contribs 04:38, 11 April 2018 (UTC)
 * 1) Move the large data table to its own module so it can be imported with   for better performance.
 * 2) Store the JSON data in pages directly to reduce maintenance and use   to load it in the data table module (need to test jsonDecode performance though).
 * 3) Reduce the HTML output so pages like Chest loot/All actually work (Tip: Special:ExpandTemplates doesn't have a limit, so you can load the template there to see the full output).
 * 4) Get rid of entirely empty columns (and maybe rows?).
 * 5) Set the entire table to be centred, then overwrite the centring for the few columns that need it (use   classes if possible), to reduce all the inline styles.