aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/gui/entity/ModifyRiding.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/gui/entity/ModifyRiding.kt')
-rw-r--r--src/main/kotlin/gui/entity/ModifyRiding.kt15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/kotlin/gui/entity/ModifyRiding.kt b/src/main/kotlin/gui/entity/ModifyRiding.kt
new file mode 100644
index 0000000..5c4c78d
--- /dev/null
+++ b/src/main/kotlin/gui/entity/ModifyRiding.kt
@@ -0,0 +1,15 @@
+
+package moe.nea.firmament.gui.entity
+
+import com.google.gson.JsonObject
+import net.minecraft.entity.LivingEntity
+
+object ModifyRiding : EntityModifier {
+ override fun apply(entity: LivingEntity, info: JsonObject): LivingEntity {
+ val newEntity = EntityRenderer.constructEntity(info)
+ require(newEntity != null)
+ newEntity.startRiding(entity, true)
+ return entity
+ }
+
+}