diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/gui')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/gui/entity/FakeWorld.kt | 8 | ||||
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/gui/entity/ModifyPlayerSkin.kt | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/gui/entity/FakeWorld.kt b/src/main/kotlin/moe/nea/firmament/gui/entity/FakeWorld.kt index ac1b33b..c838922 100644 --- a/src/main/kotlin/moe/nea/firmament/gui/entity/FakeWorld.kt +++ b/src/main/kotlin/moe/nea/firmament/gui/entity/FakeWorld.kt @@ -129,6 +129,10 @@ fun <T> makeRegistry(registryWrapper: RegistryWrapper.Impl<T>, key: RegistryKey< return Lifecycle.stable() } + override fun getDefaultEntry(): Optional<RegistryEntry.Reference<T>> { + return Optional.empty() + } + override fun getIds(): MutableSet<Identifier> { return idLookup.keys.mapTo(mutableSetOf()) { it.value } } @@ -251,7 +255,7 @@ class FakeWorld( registries[RegistryKeys.DIMENSION_TYPE].entryOf( RegistryKey.of( RegistryKeys.DIMENSION_TYPE, - Identifier("minecraft", "overworld") + Identifier.of("minecraft", "overworld") ) ), { DummyProfiler.INSTANCE }, @@ -436,7 +440,7 @@ class FakeWorld( override fun putMapState(id: MapIdComponent?, state: MapState?) { } - override fun getNextMapId(): MapIdComponent { + override fun increaseAndGetMapId(): MapIdComponent { return MapIdComponent(0) } diff --git a/src/main/kotlin/moe/nea/firmament/gui/entity/ModifyPlayerSkin.kt b/src/main/kotlin/moe/nea/firmament/gui/entity/ModifyPlayerSkin.kt index 886a17e..b382fe2 100644 --- a/src/main/kotlin/moe/nea/firmament/gui/entity/ModifyPlayerSkin.kt +++ b/src/main/kotlin/moe/nea/firmament/gui/entity/ModifyPlayerSkin.kt @@ -15,10 +15,10 @@ object ModifyPlayerSkin : EntityModifier { override fun apply(entity: LivingEntity, info: JsonObject): LivingEntity { require(entity is GuiPlayer) info["cape"]?.let { - entity.capeTexture = Identifier(it.asString) + entity.capeTexture = Identifier.of(it.asString) } info["skin"]?.let { - entity.skinTexture = Identifier(it.asString) + entity.skinTexture = Identifier.of(it.asString) } info["slim"]?.let { entity.model = if (it.asBoolean) SkinTextures.Model.SLIM else SkinTextures.Model.WIDE |