withId and withName
lenrik1589 opened this issue · 2 comments
lenrik1589 commented
Vanilla Identifiers support using strings to make actual identifier so I believe having jut Identifier be accepted is not the best
so withName is confusing as for me personally it reffers to a TranslatedText or LiteralText name
So a proper withId would be as such
public infix fun T.withId(id: Identifier) {
Registry.register(registry, id, this)
}
public infix fun T.withId(id: String) {
Registry.register(registry, if(":" in id || modid == null){
Identifier(id)
} else {
Identifier(modid, id)
}, this)
}
Peanuuutz commented
Mean to take on this job.
lenrik1589 commented
also noticed discrepancy with actual behaviour at
which should be
* If no `modid` is present, it uses `"minecraft:name"` format.