Module talk:Inventory slot/Aliases

Add "Any Wool Dye"
Can "Any Dye" also support bone meal, and "Any Wool Dye" be added to suppress the usage of bone meal? Basically like what was done with wool. --KnightMiner  (t 01:53, 6 July 2014 (UTC)


 * What about "Any Colored Dye"? –Matt ᐸ Talk Contribs ⎜ 06:08, 6 July 2014 (UTC)


 * That sounds good. The main thing I was asking for is since the definition of "Any Dye" would change, requiring many articles to update. --KnightMiner  (t 14:31, 6 July 2014 (UTC)

Fences/Fence Gates
With 1.8 it is possible to make more types of Fences and Fence Gates. Would be nice to have the following aliases :)


 * ['Any Wood Fence'] = 'Oak Fence; Spruce Fence; Birch Fence; Jungle Wood Fence; Acacia Fence; Dark Oak Fence',


 * ['Any Wood Fence Gate'] = 'Oak Fence Gate;Spruce Fence Gate;Birch Fence Gate;Jungle Fence Gate;Acacia Fence Gate;Dark Oak Fence Gate',

Oozebull (talk) 19:50, 7 August 2014 (UTC)


 * . I removed the "Wood" from the names, since that was the style mostly. Basically they are all called "wood type Fence" rather than "wood type wood Fence" --KnightMiner  (t 22:24, 7 August 2014 (UTC)


 * Surely you'd expect "Any Fence" to include Nether Brick Fence? If it's just going to have the wood ones, it should be called "Any Wood Fence". (Or maybe "Any wood Fence" since it isn't part of the name?) –Majr ᐸ Talk Contribs ⎜ 03:26, 8 August 2014 (UTC)


 * Maybe. Then again, for awhile both "Any Wool" and "Any Dye" both missed one. Then again, the goal was to switch away from that. I could switch it to that rather quick, since it is only used once so far.
 * I changed fences to now state wood, just in case we ever need "any Fence" for any fence. Are there plans to do the same to the article Fence, since the in game name now varies? (might bring it up over on fence) --KnightMiner  (t 13:32, 8 August 2014 (UTC)

Doors
Now multiple types of Wood Doors exist. I guess this alias is needed =)


 * ['Any Wood Door'] = 'Wooden Door;Spruce Door;Birch Door;Jungle Door;Acacia Door;Dark Oak Door'

Oozebull (talk) 15:47, 8 August 2014 (UTC)


 * Added as "Any wood Door" --KnightMiner  (t 17:07, 8 August 2014 (UTC)

Weird bug
There was a really weird bug in this that was causing "Script error" to display wherever   was used on this wiki. It had the following debug info: Lua error in Module:Grid/Aliases at line 224: bad argument #1 to 'insert' (table expected, got nil). Backtrace: (tail call): ? [C]: in function "insert" Module:Grid/Aliases:224: in function "init" package.lua:103: ? (tail call): ? (tail call): ? mw.lua:803: in function "loadData" Module:Grid:13: in function "cell" Module:Grid:344: in function "chunk" mw.lua:567: ? (tail call): ? [C]: in function "xpcall" MWServer.lua:87: in function "handleCall" MWServer.lua:301: in function "dispatch" MWServer.lua:40: in function "execute" mw_main.lua:7: in main chunk [C]: ? I managed to fix it by adding  after all the #1 arguments for all   calls (I couldn't find out where line 224 was because of the lack of a thing to show me line numbers that I could find)...can someone track down exactly where that particular table.insert call is and fix it? I tried my hardest and couldn't. You're welcome and thank you, AwesomeMan31415926 (profile|contribs) 04:56, 14 August 2015 (UTC)


 * It wasn't broken. You were seeing a cached version of a page from where it was broken while was making edits to it. –Majr ᐸ Talk Contribs 05:05, 14 August 2015 (UTC)

Colors abstraction
There are currently 8 objects listed here (Banners, Carpets, Shields, Stained Clay, Stained Glass, Stained Glass Panes, Wool, Firework Stars) which have "Any" modes in which they can be any of the 16 colors provided for via dyes (White, Orange, Magenta, Light Blue, Yellow, Lime, Pink, Gray, Light Gray, Cyan, Purple, Blue, Brown, Green, Red, Black). Of these, Firework Stars use a function to abstract this so that it's not necessary to physically list out all sixteen color varieties; it seems to me like this function should be generalized so it can also be applied to the other seven objects, as well as any new colored objects that may be added in the future. Similar handling could potentially be provided for wood objects (Fence Gates, Wood, Doors, Fences, Wood Planks, Wood Slabs, Wood Stairs) and types (Oak, Spruce, Birch, Jungle, Acacia, Dark Oak). I would give this a crack myself, but I'm nowhere near confident enough in Lua to risk monkeying around with something like this. 「 ディノ 奴 千？！ 」? · ☎ Dinoguy1000 12:53, 15 August 2015 (UTC)


 * . I had to use a separate loop from the firework star though, as in order to dynamically add the objects without excessively adding their name as a table, I add to loop through the items. I also added the wood stuff. – KnightMiner  t/c 15:00, 15 August 2015 (UTC)


 * Awesome, looks good. Thanks! =) 「 ディノ 奴 千？！ 」? · ☎ Dinoguy1000 07:01, 16 August 2015 (UTC)

Banners
Apparently there is no code for automatically generating aliases for each banner pattern (encompassing all colors), yet it is simple to code (I’m doing it for Russian wiki right now) and there is a mysterious “Any Banner” (with two spaces) alias in the beginning. Why is it not coded and what is that “Any Banner” thing? — NickTheRed37 (talk) 17:06, 15 April 2016 (UTC)


 * I can answer the second one; "Any Banner" is used as the ingredient in most (or all) banner recipes. Any Banner + Any Dye = Pale Sinister Banner, for instance. – Sealbudsman talk/contr 17:43, 15 April 2016 (UTC)


 * Ah, thanks. — NickTheRed37 (talk)</i> 17:56, 15 April 2016 (UTC)


 * The reason there are no color aliases for each of the banner patterns is since originally they were only used once (thus not really worth the additional length code to add them). When looping was added making the code easier to add, it technically could be added, but no one has bothered to since the alias would not be used that often to be noticed. – KnightMiner  t/c 20:35, 15 April 2016 (UTC)


 * The code would be as follows:

for _, pattern in ipairs(patterns) do local name = "Any " .. pattern .. " Banner" aliases[name] = {} for _, color in ipairs(colors) do table.insert(aliases[name], color .. " " .. pattern .. " Banner") end aliases[name] = table.concat(aliases[name], ";") end
 * — <b style="font-variant: small-caps; letter-spacing: 1px">NickTheRed37</b> (talk)</i> 17:38, 16 April 2016 (UTC)

Potions
In the game, potions include a time indicator. For example, potion of decay is displayed as. This should be implemented in the aliases. The BlobsPaper.png 20:57, 9 December 2016 (UTC)


 * . It would allow readers of the Wiki to quickly differentiate between potion lengths. I move for it to be added. Maethoredhel (t • c • Book.png) 21:01, 9 December 2016 (UTC)


 * too.    We'll need:
 * Proper aliases for each of the vanilla variants (there are 3 Strengths and it should be possible to specify them, right?),
 * A reasonable definition of what goes in the All Potions list.
 * Do all that also for Arrows, Splash Potions and Lingering Potions
 * Fix that weird purple shadow
 * It would be *so* nice to get glint on there ... but that's not within the scope of this – Sealbudsman <span style="transform: rotate(-16deg); display: inline-block; top: -1px; position: relative;">talk/contr 21:42, 9 December 2016 (UTC)
 * Applying the glow cannot be achieved here, but it can be achieved by reuploading the images. It should also be applied to enchanted books and enchanted golden apples.
 * I also agree that we should do this with tipped arrows, splash potions and lingering potions. The BlobsPaper.png 22:35, 9 December 2016 (UTC)


 * . As for the glint, the technology exists now (CSS masks are supported in FF/Chrome/Opera), but it hardly seems worth the effort. Maybe we could just apply a simple purple tint. –Majr ᐸ <small style=display:inline-block;line-height:9px;vertical-align:-3px>Talk Contribs 05:43, 11 December 2016 (UTC)
 * We don't want to mislead people into the idea that enchanted golden apples look like regular ones. The CSS does need to be applied. The BlobsPaper.png 05:51, 11 December 2016 (UTC)
 * What are the difficulties? Is it the two moving layers, or the fact that it's not wholly supported everywhere yet, or something? –  Sealbudsman <span style="transform: rotate(-16deg); display: inline-block; top: -1px; position: relative;">talk/contr 07:40, 11 December 2016 (UTC)
 * We should also implement the glint for Module:Sprite, particularly for ItemSprite., is this possible? The BlobsPaper.png 05:08, 12 December 2016 (UTC)
 * The difficulty is primarily capturing a transparent looping image of the glint effect, since it's a randomly generated effect from a source image that could possibly take a long time before it loops. Then we'd need to have a script to animate it, since it needs to be partially transparent (so a GIF is out of the question), and that's assuming that CSS masks will even work properly with a spritesheet. It's a lot of work for very minimal benefit (and it won't work on old browsers + edge and some mobile browsers maybe), hence why we haven't done it all these years, and why I'm suggesting a simple purple tint to represent it instead. –Majr ᐸ <small style=display:inline-block;line-height:9px;vertical-align:-3px>Talk Contribs 09:43, 12 December 2016 (UTC)
 * I see. I just played around with it, and I'm not too sure even overlaying a static mask over an arbitrary sprite, having it respect the transparency of the sprite, is a possible thing. Would you accomplish it rather by just uploading new sprites? –  Sealbudsman <span style="transform: rotate(-16deg); display: inline-block; top: -1px; position: relative;">talk/contr 17:33, 12 December 2016 (UTC)
 * If we just use a tint, it would use new sprites. –Majr ᐸ <small style=display:inline-block;line-height:9px;vertical-align:-3px>Talk Contribs 05:44, 13 December 2016 (UTC)
 * Can someone reupload the sprite sheet? I am not able to do this. The BlobsPaper.png 14:53, 13 December 2016 (UTC)
 * In the aliased list it should be a parameter, I was thinking, but in the template itself, this would be more similar to using  . The BlobsPaper.png 01:15, 16 December 2016 (UTC)
 * We'll want extended variants as well, right? versus  –  Sealbudsman <span style="transform: rotate(-16deg); display: inline-block; top: -1px; position: relative;">talk/contr 07:40, 11 December 2016 (UTC)
 * Yes we do. The BlobsPaper.png 14:45, 11 December 2016 (UTC)
 * Yes we do. The BlobsPaper.png 14:45, 11 December 2016 (UTC)

We could start by reuploading the sprite sheet. This would not allow the glint to be animated, nor would it work for enchanted items, but it would work for potions, enchanted books, and enchanted golden apples. The BlobsPaper.png 15:33, 14 January 2017 (UTC)
 * The status effect is added, the "When Applied" and attribution line can also be added, but the current list support only one status effect so Potion of the Turtle Master is left untouched. a20001017Talk 10:11, 14 April 2018 (UTC)
 * Turtle Master can be added manually through display aliases (which is how the effects of Night Vision and Decay were added previously). I will do that, as well as adding display aliases for extended and enhanced potions (to make them display the correct icons; the effect text works). - Princess Nightmoon (Splash Water Bottle.pngLingering Water Bottle.png) 10:43, 14 April 2018 (UTC)
 * Well, that didn't fix the icons, but there is something in a related template/module that might. Will try that now. - Or rather, I would, but something appears to have broken. - And now it's fixed; when a20001017 added levels, they forgot to put an empty parameter for one of the effects, which somehow broke the entire module. - Princess Nightmoon (Splash Water Bottle.pngLingering Water Bottle.png) 11:38, 14 April 2018 (UTC)

Add matching stone or any purpur.
Stone slabs can be crafted by using andesite, diorite, or granite/(polished). Purpur stairs/slabs can be crafted using purpur block or purpur pillars. Since they have a same block id, I think aliases would be useful. - ItsPlantseed  |  15:44, 19 February 2017 (UTC)


 * Good call. Added, and updated the slab and stair pages. –  Sealbudsman <span style="transform: rotate(-16deg); display: inline-block; top: -1px; position: relative;">talk/contr 23:40, 19 February 2017 (UTC)

Matching Bed & Matching Wool
The new colored beds are already exist in Pocket Edition. It can be crafted in two ways:

and

Can someone add the "Matching Bed"? - ItsPlantseed  |  04:54, 1 April 2017 (UTC)
 * The BlobsPaper.png 13:13, 1 April 2017 (UTC)

Recent edits to the module
It appears that the module is messed up after your recent edits to it, see Ocelot, Coral, and Salmon (item). Unfortunately, I'm not at all good at Lua, so I'm not sure how it can be fixed - I just thought I would let you know.-- Madminecrafter12 Orange Glazed Terracotta.png to meLight Blue Glazed Terracotta.png 00:41, 6 August 2018 (UTC)


 * Yes, I see that; I apologize. Not sure what the issue is myself yet. I can revert the edits if you have not already. --Bg samm (talk) 00:49, 6 August 2018 (UTC)


 * No problem - I went ahead and reverted the edit for now, because it does mess up a lot of pages. Although I don't know much about Lua, I do know it's quite easy to create major problems just by forgetting to add or remove one character - honestly, I would prefer it not to display a huge red message for all readers of the MCW to see if an error occurs. We can have someone look into this, but for now, it's probably better to keep it the way it was before.-- Madminecrafter12 Orange Glazed Terracotta.png to meLight Blue Glazed Terracotta.png 00:54, 6 August 2018 (UTC)

Inconsistent spacing in trident tooltips
They have an extra space before the attack speed / damage lines, is that intended? --AttemptToCallNil (report bug, view backtrace) 20:20, 16 July 2020 (UTC)
 * I don't think that this is intended, but it is an easy fix. - Magiczocker (talk) 20:27, 16 July 2020 (UTC)
 * Agree, though I don't know which one is right. --AttemptToCallNil (report bug, view backtrace) 21:20, 16 July 2020 (UTC)
 * Trident just looks wrong somehow, pretty sure Iron Hoe is correct. – KnightMiner  t/c 03:11, 17 July 2020 (UTC)
 * . Syntax looks a little odd, which is probably why it was done wrongly at first. – KnightMiner  t/c 03:13, 17 July 2020 (UTC)