Better Boss Battles datapack incompatibility
KostromDan opened this issue ยท 0 comments
In this datapack on wither kill will be explosion, that destroy wither eye. Now i fixed it with kubejs, but maybe it better to do in mod side.
EntityEvents.death(event => {
if (event.entity.getType().contains('minecraft:wither')) {
let itemEntity = event.level.createEntity("item")
itemEntity.y = event.entity.y
itemEntity.x = event.entity.x
itemEntity.z = event.entity.z
itemEntity.item = 'endrem:wither_eye'
itemEntity.item.count = 1
itemEntity.setInvulnerable(true)
itemEntity.setGlowing(true)
itemEntity.setPickUpDelay(100)
itemEntity.spawn()
}
})