aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/gui/entity/ModifyWither.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/gui/entity/ModifyWither.kt')
-rw-r--r--src/main/kotlin/gui/entity/ModifyWither.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/kotlin/gui/entity/ModifyWither.kt b/src/main/kotlin/gui/entity/ModifyWither.kt
index 6083d88..67252b8 100644
--- a/src/main/kotlin/gui/entity/ModifyWither.kt
+++ b/src/main/kotlin/gui/entity/ModifyWither.kt
@@ -2,14 +2,14 @@
package moe.nea.firmament.gui.entity
import com.google.gson.JsonObject
-import net.minecraft.entity.LivingEntity
-import net.minecraft.entity.boss.WitherEntity
+import net.minecraft.world.entity.LivingEntity
+import net.minecraft.world.entity.boss.wither.WitherBoss
object ModifyWither : EntityModifier {
override fun apply(entity: LivingEntity, info: JsonObject): LivingEntity {
- require(entity is WitherEntity)
+ require(entity is WitherBoss)
info["tiny"]?.let {
- entity.setInvulTimer(if (it.asBoolean) 800 else 0)
+ entity.invulnerableTicks = if (it.asBoolean) 800 else 0
}
info["armored"]?.let {
entity.health = if (it.asBoolean) 1F else entity.maxHealth