Rivoreo Source Code Repositories
src.rivoreo.one
/
minecraft
/
tmcmr
/
3f20a2d56f853c73160c7a20fa9f6020351499e6
/
.
/
block-data
/
parse-block-names.rb
blob: d559894b0ebb18851dc72f458cbe54c8fe7381a0 [
file
] [
log
] [
blame
] [
raw
]
while
line
=
gets
line
=
line
.
gsub
(
/\[\[[^\|\]]+\|([^\]]+)\]\]/
,
'\1'
)
line
=
line
.
gsub
(
'['
,
''
).
gsub
(
']'
,
''
)
if
line
=~
/\{\{dec-hex\|(\d+)\}\}\s*\|\|\s*([^\|<#]+)/
num
=
$1
.
to_i
name
=
$2
.
strip
puts
"0x%04X\t%s"
%
[
num
,
name
]
end
end