Untitled
unknown
plain_text
a year ago
814 B
12
Indexable
var lamaFound = false
val entities = location.chunk.entities
val title = messageManager.getMessage("title")
for (entity in entities) {
if (entity is Llama && entity.customName() == title) {
llama = entity
lamaFound = true
break
}
}
if (!lamaFound) {
llama = world.spawn(Location(world, 0.0, -66.0, 0.0), Llama::class.java) {
it.setAI(false)
it.isTamed = true
it.isInvulnerable = true
it.isInvisible = true
it.customName(
title
)
it.isCustomNameVisible = true
it.isPersistent = true
it.removeWhenFarAway = false
it.isSilent = true
it.strength = 5
it.isCarryingChest = true
it.setGravity(false)
}
}
val inventory = llama.inventoryEditor is loading...
Leave a Comment