diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-03 01:24:24 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-03 01:24:24 +0100 |
commit | e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e (patch) | |
tree | fecc0322e48a399df7697da11adfb022d5641a6c /src/main/kotlin/gui/entity/ModifyHorse.kt | |
parent | 646843ba3b960ac48f9866b3640438d3cc1dafc4 (diff) | |
download | Firmament-e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e.tar.gz Firmament-e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e.tar.bz2 Firmament-e2677d6ee5c3f74d5f547ca48bf6641f047a2a1e.zip |
1.21.3 WIP
Diffstat (limited to 'src/main/kotlin/gui/entity/ModifyHorse.kt')
-rw-r--r-- | src/main/kotlin/gui/entity/ModifyHorse.kt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/kotlin/gui/entity/ModifyHorse.kt b/src/main/kotlin/gui/entity/ModifyHorse.kt index 8ac011b..f094ca4 100644 --- a/src/main/kotlin/gui/entity/ModifyHorse.kt +++ b/src/main/kotlin/gui/entity/ModifyHorse.kt @@ -8,6 +8,7 @@ import kotlin.experimental.inv import kotlin.experimental.or import net.minecraft.entity.EntityType import net.minecraft.entity.LivingEntity +import net.minecraft.entity.SpawnReason import net.minecraft.entity.passive.AbstractHorseEntity import net.minecraft.item.ItemStack import net.minecraft.item.Items @@ -19,11 +20,11 @@ object ModifyHorse : EntityModifier { var entity: AbstractHorseEntity = entity info["kind"]?.let { entity = when (it.asString) { - "skeleton" -> EntityType.SKELETON_HORSE.create(fakeWorld)!! - "zombie" -> EntityType.ZOMBIE_HORSE.create(fakeWorld)!! - "mule" -> EntityType.MULE.create(fakeWorld)!! - "donkey" -> EntityType.DONKEY.create(fakeWorld)!! - "horse" -> EntityType.HORSE.create(fakeWorld)!! + "skeleton" -> EntityType.SKELETON_HORSE.create(fakeWorld, SpawnReason.LOAD)!! + "zombie" -> EntityType.ZOMBIE_HORSE.create(fakeWorld, SpawnReason.LOAD)!! + "mule" -> EntityType.MULE.create(fakeWorld, SpawnReason.LOAD)!! + "donkey" -> EntityType.DONKEY.create(fakeWorld, SpawnReason.LOAD)!! + "horse" -> EntityType.HORSE.create(fakeWorld, SpawnReason.LOAD)!! else -> error("Unknown horse kind $it") } } |