Module:Inventory slot/Aliases

-- --Initial values from https://minecraft.gamepedia.com/Module:Inventory_slot/Aliases local aliases = {} local tooltips = require('Module:Inventory_slot/Tooltips')

local function MergeTables(t1,t2) for k,v in pairs(t2) do t1[k] = v end end

-- Item Tool tips -- -- See https://hypixel.net/threads/guide-minecraft-color-codes.1741307/ -- for information on the color syntax. -- -- Other syntax: -- *\ - New line

MergeTables(aliases, tooltips)

MergeTables(aliases, {	['Oak Wood Planks'] = aliases['Oak Wood Plank'],	['Spruce Wood Planks'] = aliases['Spruce Wood Plank'],	['Birch Wood Planks'] = aliases['Birch Wood Plank'],	['Jungle Wood Planks'] = aliases['Jungle Wood Plank'],	['Acacia Wood Planks'] = aliases['Acacia Wood Plank'],	['Dark Oak Wood Planks'] = aliases['Dark Oak Wood Plank'], })

-- -- Hypixel Skyblock stuff -- MergeTables(aliases, {	-- Display names --	['Melon'] = { title = 'Melon', name = 'Melon Slice' },	['Melon Slice'] = { title = 'Melon', name = 'Melon Slice' },	['Melon (block)'] = { title = 'Melon', name = 'Melon (block)' },	['Mushroom'] = { 'Red Mushroom', 'Brown Mushroom' },	['Enchanted Mushroom'] = { 'Enchanted Red Mushroom', 'Enchanted Brown Mushroom' },	-- Fake items	['Air (minion)'] = { title = 'Air', name = 'Minions', image = 'Air (minion)', text = '&7Air should be 1 layer/underneath where the minion/is standing.', link = 'none' },	['Blank'] = { image = 'Black Stained Glass Pane', name = 'none', title = 'none', link='none', text='none' },	['Blank (Red)'] = { image = 'Red Stained Glass Pane', name = 'none', title = 'none', link='none', text='none' },	['Blank (Green)'] = { image = 'Lime Stained Glass Pane', name = 'none', title = 'none', link='none', text='none' },	['Sell Item'] = { name = 'Hopper', title = '&aSell Item', link='none', text='&7Click items in your inventory to/sell them to the shop!' }, ['Close'] = { name = 'Barrier', title = '&cClose', link='none', text='none' }, ['Cancel'] = { name = 'Barrier', title = '&cCancel', link='none', text='none' }, ['Go Back'] = { name = 'Arrow', title = '&aGo Back', link='none'}, ['Next Page'] = { name = 'Arrow', title = '&aNext Page', link='none'}, ['Previous Page'] = { name = 'Arrow', title = '&aPrevious Page', link='none'}, })

-- Make it so enchanted books link to enchantments with href to enchant local enchantments = { 'Aiming', 'Angler', 'Aqua Affinity', 'Bane of Arthropods', 'Blast Protection', 'Blessing', 'Caster', 'Cleave', 'Critical', 'Cubism', 'Depth Strider', 'Dragon Hunter', 'Efficiency', 'Ender Slayer', 'Execute', 'Experience', 'Feather Falling', 'Fire Aspect', 'Fire Protection', 'First Strike', 'Flame', 'Fortune', 'Frail', 'Frost Walker', 'Giant Killer', 'Growth', 'Harvesting', 'Impaling', 'Infinite Quiver', 'Knockback', 'Lethality', 'Life Steal', 'Looting', 'Luck', 'Luck of the Sea', 'Lure', 'Magnet', 'Piercing', 'Power', 'Projectile Protection', 'Protection', 'Punch', 'Rainbow', 'Replenish', 'Respiration', 'Scavenger', 'Sharpness', 'Silk Touch', 'Smelting Touch', 'True Protection', 'Smite', 'Snipe', 'Spiked Hook', 'Sugar Rush', 'Telekinesis', 'Thorns', 'Thunderlord', 'Vampirism', 'Venomous' } local enchantmentTiers = { "I", "II", "III", "IV", "V", "VI" }; for _, name in ipairs( enchantments ) do   for _, tier in ipairs( enchantmentTiers ) do        local key = "Enchanted Book ("..name.." "..tier..")" aliases[key] = { title = "Enchanted Book", text="&9"..name.." "..tier, name = "Enchantments#".. mw.uri.anchorEncode(name), image = "Enchanted Book" } end end

-- -- Vanilla Minecraft stuff (may have some edits) -- local coloredDyes = { 'Orange Dye', 'Magenta Dye', 'Light Blue Dye', 'Dandelion Yellow', 'Lime Dye', 'Pink Dye', 'Gray Dye', 'Light Gray Dye', 'Cyan Dye', 'Purple Dye', 'Lapis Lazuli', 'Cocoa Beans', 'Cactus Green', 'Rose Red', 'Ink Sack', } MergeTables(aliases, {	-- Common fuel types for furnace --	['Any fuel'] = { aliases['Coal'], aliases['Charcoal'], aliases['Oak Wood'], aliases['Oak Wood Planks'], aliases['Block of Coal'], aliases['Blaze Rod'], aliases['Lava Bucket'] },	['Any leather armor'] = { aliases['Leather Cap'], aliases['Leather Tunic'], aliases['Leather Pants'], aliases['Leather Boots'] },	['Any golden armor'] = { aliases['Golden Helmet'], aliases['Golden Chestplate'], aliases['Golden Leggings'], aliases['Golden Boots'] },	['Any chainmail armor'] = { aliases['Chainmail Helmet'], aliases['Chainmail Chestplate'], aliases['Chainmail Leggings'], aliases['Chainmail Boots'] },	['Any iron armor'] = { aliases['Iron Helmet'], aliases['Iron Chestplate'], aliases['Iron Leggings'], aliases['Iron Boots'] },	['Any diamond armor'] = { aliases['Diamond Helmet'], aliases['Diamond Chestplate'], aliases['Diamond Leggings'], aliases['Diamond Boots'] }, -- Display names -- ['Enchanted Golden Apple'] = { title = '&dEnchanted Golden Apple', name = 'Enchanted Golden Apple', image = 'Enchanted Golden Apple.gif' }, })

-- Lists of item variants -- local itemVariants = { ['Dye'] = mw.clone( coloredDyes ), ['Colored Dye'] = coloredDyes, ['Dyed Wool'] = { 'Orange Wool', 'Magenta Wool', 'Light Blue Wool', 'Yellow Wool', 'Lime Wool', 'Pink Wool', 'Gray Wool', 'Light Gray Wool', 'Cyan Wool', 'Purple Wool', 'Blue Wool', 'Brown Wool', 'Green Wool', 'Red Wool', 'Black Wool', },	['Dyed Carpet'] = { 'Orange Carpet', 'Magenta Carpet', 'Light Blue Carpet', 'Yellow Carpet', 'Lime Carpet', 'Pink Carpet', 'Gray Carpet', 'Light Gray Carpet', 'Cyan Carpet', 'Purple Carpet', 'Blue Carpet', 'Brown Carpet', 'Green Carpet', 'Red Carpet', 'Black Carpet', },	['Dyed Stained Clay'] = { 'White Stained Clay', 'Orange Stained Clay', 'Magenta Stained Clay', 'Light Blue Stained Clay', 'Yellow Stained Clay', 'Lime Stained Clay', 'Pink Stained Clay', 'Gray Stained Clay', 'Light Gray Stained Clay', 'Cyan Stained Clay', 'Purple Stained Clay', 'Blue Stained Clay', 'Brown Stained Clay', 'Green Stained Clay', 'Red Stained Clay', 'Black Stained Clay', },	['Dyed Small Backpack'] = { 'Small Backpack (white)', 'Small Backpack (orange)', 'Small Backpack (magenta)', 'Small Backpack (light blue)', 'Small Backpack (yellow)', 'Small Backpack (lime)', 'Small Backpack (pink)', 'Small Backpack (gray)', 'Small Backpack (light gray)', 'Small Backpack (cyan)', 'Small Backpack (purple)', 'Small Backpack (blue)', 'Small Backpack (brown)', 'Small Backpack (green)', 'Small Backpack (red)', 'Small Backpack (black)', },	['Dyed Medium Backpack'] = { 'Medium Backpack (white)', 'Medium Backpack (orange)', 'Medium Backpack (magenta)', 'Medium Backpack (light blue)', 'Medium Backpack (yellow)', 'Medium Backpack (lime)', 'Medium Backpack (pink)', 'Medium Backpack (gray)', 'Medium Backpack (light gray)', 'Medium Backpack (cyan)', 'Medium Backpack (purple)', 'Medium Backpack (blue)', 'Medium Backpack (brown)', 'Medium Backpack (green)', 'Medium Backpack (red)', 'Medium Backpack (black)', },	['Dyed Large Backpack'] = { 'Large Backpack (white)', 'Large Backpack (orange)', 'Large Backpack (magenta)', 'Large Backpack (light blue)', 'Large Backpack (yellow)', 'Large Backpack (lime)', 'Large Backpack (pink)', 'Large Backpack (gray)', 'Large Backpack (light gray)', 'Large Backpack (cyan)', 'Large Backpack (purple)', 'Large Backpack (blue)', 'Large Backpack (brown)', 'Large Backpack (green)', 'Large Backpack (red)', 'Large Backpack (black)', },	['Dyed Greater Backpack'] = { 'Greater Backpack (white)', 'Greater Backpack (orange)', 'Greater Backpack (magenta)', 'Greater Backpack (light blue)', 'Greater Backpack (yellow)', 'Greater Backpack (lime)', 'Greater Backpack (pink)', 'Greater Backpack (gray)', 'Greater Backpack (light gray)', 'Greater Backpack (cyan)', 'Greater Backpack (purple)', 'Greater Backpack (blue)', 'Greater Backpack (brown)', 'Greater Backpack (green)', 'Greater Backpack (red)', 'Greater Backpack (black)', },	['Dyed Jumbo Backpack'] = { 'Jumbo Backpack (white)', 'Jumbo Backpack (orange)', 'Jumbo Backpack (magenta)', 'Jumbo Backpack (light blue)', 'Jumbo Backpack (yellow)', 'Jumbo Backpack (lime)', 'Jumbo Backpack (pink)', 'Jumbo Backpack (gray)', 'Jumbo Backpack (light gray)', 'Jumbo Backpack (cyan)', 'Jumbo Backpack (purple)', 'Jumbo Backpack (blue)', 'Jumbo Backpack (brown)', 'Jumbo Backpack (green)', 'Jumbo Backpack (red)', 'Jumbo Backpack (black)', },	['Flower'] = { 'Oxeye Daisy', 'Red Tulip', 'Orange Tulip', 'White Tulip', 'Pink Tulip', 'Azure Bluet', 'Allium', 'Blue Orchid', 'Poppy', 'Dandelion' }, ['Mushroom'] = { 'Red Mushroom', 'Brown Mushroom' }, ['Quartz Block'] = { 'Block of Quartz', 'Chiseled Quartz Block', 'Quartz Pillar' }, ['Red Sandstone'] = { 'Red Sandstone', 'Chiseled Red Sandstone', 'Smooth Red Sandstone' }, ['Sandstone'] = { 'Sandstone', 'Chiseled Sandstone', 'Smooth Sandstone' }, ['Stone Bricks'] = { 'Stone Bricks', 'Mossy Stone Bricks', 'Cracked Stone Bricks', 'Chiseled Stone Bricks' }, ['Stone Slab'] = { 'Sandstone Slab', 'Cobblestone Slab', 'Brick Slab', 'Stone Brick Slab', 'Nether Brick Slab', 'Quartz Slab' }, ['Stone'] = { 'Stone', 'Andesite', 'Granite', 'Diorite', 'Polished Andesite', 'Polished Granite', 'Polished Diorite' }, ['Tulip'] = { 'Red Tulip', 'Orange Tulip', 'White Tulip', 'Pink Tulip' }, } table.insert( itemVariants['Dye'], 1, 'Bone Meal' ) for aliasName, aliasItems in pairs( itemVariants ) do aliases['Any ' .. aliasName] = aliasItems aliases['Matching ' .. aliasName] = aliasItems end

-- Discs -- --local discs = { '13', 'Cat', 'Blocks', 'Chirp', 'Far', 'Mall', 'Mellohi', 'Stal', 'Strad', 'Ward', '11', 'Wait' } --for _, disc in ipairs( discs ) do --	local name = 'Music Disc ' .. disc --	aliases[name] = { title = '&bMusic Disc', name = name, text = '&7C418 - ' .. disc } --end

-- Banners and colored items -- local colors = { 'White', 'Orange', 'Magenta', 'Light Blue', 'Yellow', 'Lime', 'Pink', 'Gray', 'Light Gray', 'Cyan', 'Purple', 'Blue', 'Brown', 'Green', 'Red', 'Black' }

-- Items that use the sixteen colors -- local coloredItems = { 'Carpet', 'Wool' } for _, item in ipairs( coloredItems ) do	local coloredItemAliases = {} local itemName = '' for _, color in ipairs( colors ) do		if item:find( '%$1' ) then itemName = string.gsub( item, '%$1', color ) else itemName = color .. ' ' .. item end table.insert( coloredItemAliases, itemName ) end item = item:gsub( '%$1 ', '') aliases['Any ' .. item] = coloredItemAliases aliases['Matching ' .. item] = coloredItemAliases end

-- Wood -- local woods = { 'Oak', 'Spruce', 'Birch', 'Dark Oak', 'Acacia', 'Jungle' } local woodItems = { 'Wood', 'Wood Plank', -- Skyblock specific 'Fence', 'Fence Gate', }

for _, item in ipairs( woodItems ) do	local itemName = '' local woodAliases = {} for _, wood in ipairs( woods ) do		if item:find('wood') then itemName = string.gsub( item, 'wood', wood ) elseif item:find('%$1') then itemName = string.gsub( item, '%$1', wood ) else itemName = wood .. ' ' .. item end table.insert( woodAliases, aliases[itemName] or itemName ) end item = string.gsub( item, '%$1 ', '' ) aliases['Any ' .. item] = woodAliases end

return aliases