It's my first real attempt at making one, and I followed the wiki's example scripts pretty closely
yet doing /summon in game nets nothing
Startup script:
StartupEvents.registry("entity_type", event => {
event.create("kubejs:boulder", "entityjs:mob")
.isInvulnerableTo(context => global.isInvulnerableTo(context))
.setMoveControl(entity => global.setMoveControl(entity))
.createNavigation(context => global.createNavigation(context))
.sized(2.5, 2.5)
.modelSize(1, 1)
.isPushable(true)
.fireImmune(true)
.mobCategory("misc")
.mobType("undefined")
.setRenderType("solid")
.canBreatheUnderwater(true)
.setWaterSlowDown(0.95)
.saves(true)
.setSoundVolume(0.5)
.setSummonable(true)
.animationResource(entity =>{
return "kubejs:animations/entity/boulder.animation.json"
})
.addAnimationController("boulderAnimationController", 1, event =>{
if (event.entity.isMoving()) {
event.thenLoop("boulder_roll");
}
else{
event.thenLoop("boulder_idle");
}
return true;
})
})
EntityJSEvents.createAttributes(event => {
event.create("kubejs:boulder", attribute => {
attribute.add("minecraft:generic.max_health", 8)
attribute.add("minecraft:generic.knockback_resistance", 0.8)
attribute.add("minecraft:generic.follow_range", 32)
})
})