File tree Expand file tree Collapse file tree
kotlin/io/github/pylonmc/pylon/core/block Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ open class PylonBlock protected constructor(val block: Block) {
7171 }
7272
7373 for (locale in schema.addon.languages) {
74- val wailaKey = WailaConfig .getWailaTranslationKey( schema.key)
74+ val wailaKey = " pylon. ${ schema.key.namespace} .item. ${schema.key.key} .waila "
7575 if (! translator.translationKeyExists(wailaKey, locale)) {
7676 PylonCore .logger.warning(" Block ${schema.key} is missing a WAILA translation key (${locale.displayName} | $wailaKey " )
7777 }
Original file line number Diff line number Diff line change @@ -18,17 +18,12 @@ data class WailaConfig @JvmOverloads constructor(
1818 val player = bar.viewers().singleOrNull() as ? Player
1919 if (player != null ) {
2020 val attacher = PlaceholderAttacher (placeholders)
21- bar.name(attacher.render(Component .translatable(getWailaTranslationKey( key) ), Unit ))
21+ bar.name(attacher.render(Component .translatable(" pylon. ${ key.namespace} .item. ${key.key} .waila " ), Unit ))
2222 } else {
23- bar.name(Component .translatable(getWailaTranslationKey( key) ))
23+ bar.name(Component .translatable(" pylon. ${ key.namespace} .item. ${key.key} .waila " ))
2424 }
2525 bar.color(color)
2626 bar.overlay(style)
2727 bar.progress(progress)
2828 }
29-
30- companion object {
31- fun getWailaTranslationKey (key : NamespacedKey ): String
32- = " pylon.${key.namespace} .block.${key.key} "
33- }
3429}
Original file line number Diff line number Diff line change 88 phantom_block :
99 name : " <red>Phantom Block (%block%)"
1010 lore : " "
11+ waila : " <red>Phantom Block (%block%)"
1112
1213 debug_waxed_weathered_cut_copper_stairs :
1314 name : " <red>Debug Waxed Weathered Cut Copper Stairs"
1415 lore : " <insn>Right click</insn> a block to view its Pylon block data"
1516
16- block :
17- phantom_block : " <red>Phantom Block (%block%)"
18-
1917message :
2018 debug :
2119 not_a_block : " <red>This is not a Pylon block"
You can’t perform that action at this time.
0 commit comments