mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 02:15:34 -04:00
network legacy: properly use fixer to fix resource locations
This commit is contained in:
parent
f04a2720ca
commit
c13f2f3445
@ -274,7 +274,9 @@ class PlayInByteBuffer : InByteBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun <T : RegistryItem> readLegacyRegistryItem(registry: Registry<T>, fixer: ResourceLocationFixer? = null): T? {
|
fun <T : RegistryItem> readLegacyRegistryItem(registry: Registry<T>, fixer: ResourceLocationFixer? = null): T? {
|
||||||
return registry[readResourceLocation()]
|
var name = readResourceLocation()
|
||||||
|
fixer?.fix(name)?.let { name = it }
|
||||||
|
return registry[name]
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <T : Enum<*>> readEnum(registry: EnumRegistry<T>): T? {
|
fun <T : Enum<*>> readEnum(registry: EnumRegistry<T>): T? {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user