VOOZH about

URL: https://minecraft.wiki/w/Module:Data_value_table

⇱ Module:Data value table – Minecraft Wiki


Module:Data value table

From Minecraft Wiki
Jump to navigation Jump to search
Documentation[create] [purge]
This module has no documentation. If you know how to use this module, please create it.
localp={}
functionp.main(f)
localargs=f
iff==mw.getCurrentFrame()then
args=f:getParent().args
else
f=mw.getCurrentFrame()
end
localsf=require('Module:SpriteFile')
localstype='BlockSprite'
ifargs.spritetype=='item'then
stype='ItemSprite'
elseifargs.spritetype=='entity'then
stype='EntitySprite'
end
localoutput={}
table.insert(output,'<table class="wikitable collapsible" style="text-align: center">'..
'<tr><th></th><th>[[Data values|DV]]</th><th>Description</th></tr>')
localitems={}
fork,vinpairs(args)do
iftype(k)=='string'then
localitem=k:match('(%d+)')
ifitemandvthen
table.insert(items,tonumber(item))
end
end
end
table.sort(items)
for_,vinipairs(items)do
table.insert(output,'<tr><td>')
localsprite=args['sprite'..v]
ifargs[v]=='-'then
table.insert(output,sf.sprite{'Air',name='BlockSprite'}..'</td><td>'..'<span style="color:gray">(unused)</span>'..'</td><td>'..args[v])
else
ifspritethen
table.insert(output,sf.sprite{sprite,name=stype}..'</td><td>'..v..'</td><td>'..args[v])
else
table.insert(output,sf.sprite{'Air',name='BlockSprite'}..'</td><td>'..v..'</td><td>'..args[v])
end
end
table.insert(output,'</td></tr>')
end
returntable.concat(output)
end
returnp
Retrieved from "https://minecraft.wiki/w/Module:Data_value_table?oldid=2653958"

Navigation menu