Template:Hardness values: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
m removed leftover stuff from rewrite
m update module
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{{
<includeonly>{{#invoke: block value | value | type=hardness }}</includeonly><noinclude>
#vardefine: $block | {{{1}}}<!-- easy testing: insert test value here -->}}{{
{{documentation}}
#vardefine: $block | {{ lc: {{<!-- initial transform: lowercase, singularize -->
<!-- Put categories/interwiki on the documentation page -->
  #switch: {{lc:{{#explode: {{ #var: $block }} || -1 }} }}
  | glass
  | steps | stairs
  | bars
  | cactus
  | leaves
  | grass
  | potatoes = {{ #var: $block }} <!-- don't strip the trailing "s" from these; that just looks weird =) -->
  | #default = {{
    #ifeq: {{ #sub: {{ #var: $block }} | -1 }} | s
    | {{ #sub: {{ #var: $block }} || -1 }}
    | {{ #var: $block }}
    }}
  }} }}
}}{{
#vardefine: $block | {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{ #replace: {{
  #var: $block }}
  | wooden | wood }}
  | mossy | moss }}
  | steps | stairs }}
  | ( }}
  | ) }}
  | ' }}
  | - }}<!-- "wooden" to "wood", "mossy" to "moss", "steps" to "stairs", strip parentheses, apostrophes, hyphen-minuses -->
}}{{
#vardefine: $block | {{
  #ifeq: {{ #explode: {{ #var: $block }} || -1 }} | block<!-- strip "block" -->| {{
    #switch: {{ #var: $block }}
    | redstone block
    | grass block = {{ #var: $block }}
    | #default = {{
      #replace: {{ #var: $block }} | block }}
    }}
  | {{ #var: $block }}
  }}
}}{{
#vardefine: $block | {{
  #replace: {{ #var: $block }} }}<!-- final transform: strip whitespace -->
}}{{
#switch: {{ #var: $block }}<!--
 
all values per the minecraft source code as of minecraft 1.7.10, do not changed them without cause
 
-->
| flowinglava  | lava
| flowingwater | water = 100
 
| obsidian = 50
 
| enderchest = 22.5
 
| anvil
| coal          | blockofcoal
| diamond      | blockofdiamond
| emerald      | blockofemerald
| enchantingtable
| iron          | blockofiron | ironbar | irondoor
| mobspawner    | monsterspawner
| redstoneblock | blockofredstone = 5
 
| web = 4
 
| dispenser
| dropper
| furnace = 3.5
 
| beacon
| coalore
| diamondore
| dragonegg
| emeraldore
| endstone
| gold    | blockofgold | goldore
| hopper
| ironore
| lapis    | lapislazuli | blockoflapis | blockoflapislazuli
| lapisore | lapislazuliore
| quartzore
| redstoneore
| trapdoor
| wooddoor = 3
 
| chest | trappedchest
| craftingtable = 2.5
 
| brick      | brickstairs
| cauldron
| cobblestone | stonestairs      | cobblestonewall |
| doubleslab  | wooddoubleslab
| fence      | fencegate
| jukebox
| mossstone  | mosscobblestone
| netherbrick | netherbrickfence | netherbrickstairs
| slab        | woodslab
| log
| woodplank  | woodstairs = 2
 
| bookshelf
| stone
| stonebrick | stonebrickstairs = 1.5
 
| hardenedclay
| stainedclay = 1.25
 
| melon
| pumpkin | jackolantern
| sign
| skull | mobhead = 1
 
| note
| quartz | blockofquartz | quartzstairs
| sandstone | sandstonestairs
| wool = 0.8
 
| monsteregg | block97 = 0.75
 
| rail | detectorrail | poweredrail | activatorrail = 0.7
 
| clay
| farmland
| grass block
| gravel
| lilypad
| mycelium
| sponge = 0.6
 
| button | stonebutton | woodbutton
| brewingstand
| cake
| dirt | podzol | coarse dirt
| haybale | hay
| ice | packedice
| lever
| piston          | stickypiston
| pistonextension | pistonhead        | block34
| pressureplate        | stonepressureplate        | woodpressureplate
| weightedpressureplate | heavyweightedpressureplate | lightweightedpressureplate
| sand
| soulsand = 0.5
 
| cactus
| ladder
| netherrack = 0.4
 
| glass | glasspane
| glowstone
| redstonelamp
| stainedglass | stainedglasspane = 0.3
 
| bed
| cocoa        | cocoaplant
| daylightdetector
| hugemushroom | hugebrownmushroom | hugeredmushroom
| leaves
| vine
| snow = 0.2
 
| carpet
| snowcover = 0.1
 
| carrot
| comparator | redstonecomparator
| deadbush
| flower
| flowerpot
| fire
| grass    | tallgrass
| mushroom  | brownmushroom | redmushroom
| melonstem | melonseed    | pumpkinstem | pumpkinseed
| netherwart
| potato    | potatoes
| redstone  | redstonewire
| repeater  | redstonerepeater
| redstonetorch
| sapling
| sugarcane
| torch
| tripwire | tripwirehook
| tnt
| wheat | crop | seed = 0
 
| bedrock
| commandblock
| endportal      | endportalframe
| pistonextension | block36
| portal = -1
 
| air = n/a
| #default        = [[Template:Hardness values#Missing value|?]]{{
  #if: {{NAMESPACE}}{{#pos: {{PAGENAME}} | / }} || [[Category:Missing hardness]]
  }}
}}</includeonly><noinclude>
{{/doc}}
 
[[Category:Data Templates]]
</noinclude>
</noinclude>

Latest revision as of 15:41, 23 December 2014

[create] [refresh]Documentation
This template has no documentation. If you know how to use this template, please create it.