Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Kotlin Features

Gregory Mitchell edited this page May 29, 2024 · 1 revision

MobChip features additional mechanics usually seen in Kotlin, such as operator functions and useful extension members. You don't need to do anything else to set these up.

fun changeBrain(entity: Entity) {
    val m = entity as? Mob ?: return
    val brain = m.brain

    val controller = m.controller
    controller.jump().jump()

    val goalSelector = m.goalSelector
    goalSelector.put(0, PathfinderFloat())
}
val p1 = Position(0, -1, 0)
val p2 = Position(3, 2, 3)

val p3 = p1 + p2
val spawn = p.getLocation()
val edragon = spawn.getWorld().spawn(EnderDragon.class, spawn)

val phases = edragon.phases // DragonPhases in MobChip

Clone this wiki locally