#EntitiyJS Anim Command
615 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
in what instance would you use a command to change the animation?
when the animal attacks or something?
or when certain conditions are met?
well it's a bit specific and probably not supported but
let me say the cursed word
I am working on a hybrid server atm
so to interface with plugins I need to create a command for it

yeah..
why not just specify what the entity is doing like this?
StartupEvents.registry('entity_type', event => {
event.create('wyrm', 'entityjs:animal')
.addAnimationController('exampleController', 20, event => {
// Define conditions for the animation to be played based on the entity.
if (event.entity.hurtTime > 0) {
event.thenPlayAndHold('spawn');
} else {
event.thenLoop('idle');
}
return true; // Some boolean condition indicating if the animation should be played;
});
})```
since you have the entity here you can do whatever
or we can use pData for it right?
and register command for giving entities pdata
yup
StartupEvents.registry('entity_type', event => {
event.create('wyrm', 'entityjs:animal')
.addAnimationController('exampleController', 20, event => {
// Define conditions for the animation to be played based on the entity.
if (event.entity.persistentData.animstate == "attack1") {
event.thenPlayAndHold('attack1');
} else {
event.thenLoop('idle');
}
return true; // Some boolean condition indicating if the animation should be played;
});
})```
so this should work
if that works in a regular event to return true in the if statement then it will work here yes
wait so animation controller checks the events every tick?
yup
kubejs + entityjs wouldn't be a problem I think
so you finished the wiki or do I need to use probejs
wiki should be well documented
i even added full example usages with every possible method overridden
should be whatever geckolib 4 set it up as
sec
"kubejs:animations/entity/wyrm.animation.json"
"kubejs:geo/entity/wyrm.geo.json"
"kubejs:textures/entity/wyrm.png"
for example if you didnt put a namespace in the .create("wyrm") itd look for it in the kubejs folder
oh wait I am using "reina" namespace
so itd be reina instead of kubejs in the folder path
although it should default to it without the need to manually set it in the startup script
.create("reina:wyrm") if you do that that is
ye
yeah I really don't need it but just you know in case I mess up something
probably not without me directly checking for it in the geckolib mod since they handle that part
I forget to remove the hitbox cube in blockbench so it looks a bit messy but currently fixing it

any in this code 20 inditaces every 20 tick?
20 is the transition time between animations
20 ticks
prob wanna set it to something like 5
you can return with the js if (event.entity.age % 20 != 0) return trick if needed tho youll have to be careful you arent having any animation downtime or else it'll look weird
let me post it on offtopic so everyone sees it
sure
theres a way to tell the animation time, lemme check
if you have probejs it should tell you with the event. too
well I'm at my home pc (that I never use) so I don't have probejs
oh wait
youll have to know how many ticks your animation is though
I want to make the animation play once
oh really?
it plays then holds on the last frame
I thought hold indicates to stop all the animations
so when stopped it will continue to idle since else is set to idle right?
itll play once til you set another animation to play
so for example if you got rid of all those if statements
so I will set to the walking if entity is moving?
yes
thanks a lot
if js (event.isMoving())
let me test the other things and close this ticket
you have the direct boolean to if the entity is moving
and use thenPlayAndHold again?
no youd loop prob
okay
as long as the entity is moving you'd loop
id imagine thatd be the smoothest way to go about it anyways
theres already a persistentdata/scoreboard command with kubejs
but I can't set anything with it I think
sec
[➤](#1198605420395233380 message) In the picture is what I get when I do /kubejs persistent_data server get itemDetails. I wanted to reset the item details, so I did /kubejs persistent_data server merge {itemDetails:{}}, but it changed nothing. Setting it to a number or a string works.
something like what dragons doing
yeah woekd
except itd be like /kubejs persistent_data server merge {animation:{1}} or something
worked
nice
but needs to restart
1min
I need to download optimisation mods asap.
oh it crashed
yeah summoning the mob crashes it
crash report
Paste version of message.txt from @reef briar
StartupEvents.registry('entity_type', event => {
event.create('reina:mfwardenarcher', 'entityjs:animal')
.addAnimationController('exampleController', 5, event => {
// Define conditions for the animation to be played based on the entity.
if (event.entity.persistentData.animState) {
event.thenPlayAndHold(event.entity.persistentData.animState);
}
if (event.entity.isMoving()) {
event.thenLoop("walk");
}
else {
event.thenLoop('idle');
}
return true; // Some boolean condition indicating if the animation should be played;
});
})```
startup script
this is the line 236
removed the ismoving part
and now the animations with "event.entity.persistentData.animState" does not play
its event.isMoving() not event.entity.isMoving()
sorry its 5 am in here waited for this all day.
this part
do this ```js
StartupEvents.registry('entity_type', event => {
event.create('reina:mfwardenarcher', 'entityjs:animal')
.addAnimationController('exampleController', 5, event => global.animations(event));
})
/**
*
- @param {Internal.BaseLivingEntityBuilder$AnimationEventJS<any>} event
*/
global.animations = event => {
// Define conditions for the animation to be played based on the entity.
if (event.entity.persistentData.animState) {
event.thenPlayAndHold(event.entity.persistentData.animState);
}
if (event.entity.isMoving()) {
event.thenLoop("walk");
}
else {
event.thenLoop('idle');
}
return true; // Some boolean condition indicating if the animation should be played;
}``` so you can live edit it with /kubejs reload startup_scripts
global events will be your best friend using entityjs
yes it is working other then event.entity.persistentData.animState part
reloading is now fine
im going to be implimenting on event-like animation triggers for stuff like this but i havent gotten around to it yet
oh so the problem is not about the code?
thats what geckolib has and i will be able to impliment it easily i assume
the issue is the code yes
the way youre detecting that persistent data is wrong
but yeah theres better ways to impliment stuff like this on my end too
any help...
i'll look into stuff like this tomorrow i guess
[➤](#1211848958889172992 message) im gonna have to take a look at this tomorrow when i have an instance open

okay than no need to bother you
okay okay!!
@dawn oar sorry for ping but how did it go?
have yet to try it
k k!
oh
you probably need to initialize the persistent data first
on the entity
cant merge with no value, you have to set it to something first
well I set to kick in here but nothing happened
whats the command you have
I'm just confused
send it here
youre reading from null tho
in the if statement
well currently there is no command
you have to initiate it first before you can read from the if
I just made with merge
any examples me to undestand..
sec
[➤](#1165567460242640896 message) you would just give them the pdata elytratimer 1(this is needed to initiate the pdata on the player) with the command
so I will create a new event everytime a mob spawns and give it that pdata right?
UH
first id like to see how you'd impliment it "attacking" something
cause you'll need goals for that
for example this ```js
//addGoalSelectors Server Script
EntityJSEvents.addGoalSelectors('kubejs:wyrm', e => {
let Player = Java.loadClass('net.minecraft.world.entity.player.Player')
//You have the ability to add pre built goals like so to your entity. (with more to come!)
e.panic(1, 0.5)
e.floatSwim(1)
e.meleeAttack(4, 1, true)
e.leapAtTarget(3, 0.4)
e.waterAvoidingRandomStroll(5, 0.4, 0.8)
e.lookAtEntity(6, Player, 8, 0.8, false)
e.randomLookAround(7)
})
//addGoals Server Script
EntityJSEvents.addGoals("kubejs:wyrm", event => {
let Cow = Java.loadClass('net.minecraft.world.entity.animal.Cow')
event.hurtByTarget(1, [Cow], true, [Cow])
event.nearestAttackableTarget(2, Cow, 5, false, false, entity => {
return entity.age < 500
})
})``` would make your mob attack a cow on sight
though youll have to change out "kubejs:wyrm" to your mob
I currently didn't implement attacking
i wonder if theres an "isattacking" method somewhere we could use here 
so wait
I'm confused
I just want to make entity play animation not implement attacking etc.
ok back to my earlier question then, how will your entity attack?
well, in past I was using item displays connected to eachother to create one model, each item display had models 1 bone and together they created the model, but it was so laggy and all serverside
but for animations I implemented custom functions to my code so
I just need to replace that buggy ass animation code with command that entity runs it
attacking, custom attacks, death animations etc. everything is handled in serverside not in kubejs
so I just need to create a command to make an entity play animation, and integrate that command with my code
yeah brain burning I know
but currently it is the fastest method
that way I will only change this to
with this
or something similar
I hope you get the main idea
i think my time would be better spent trying to add the on-event like animations instead of doing a buggy workaround here so let me take a look into that while you try and figure this out
cause i know geckolib adds this functionality built into their mod already
oh so wontfix?
btw intead of commands you could easily replicate it by setting the persistent data directly through the onevent methods the entity already has
theres an .onDeath method you have already
well it was an example
there are custom animations that I don't want to implement through kubejs
.onDeath(context => {
const { damageSource,entity } = context
entity.persistentData
})```
so wontfix or scheduled?
yeah im gonna look into it on the dev side, might be a while before i figure it out tho

theres also .doAutoAttackOnTouch
well should I just close this now?
keep it open til i get back with you about it
also gonna put this here incase you need it for an attack js .doAutoAttackOnTouch(context => { const { target, entity } = context })
yeah I was thinking about that
implementing common animations like walk, attack, death on kubejs and leave rest (bossattack1, kick, digdown, etc.) animations to my code but I dunno
oh and another question
sup
what about tracking the head to look at player?
I think gecko just make you chose the head bone and handle the rest (lookin around, looking at player)
thanks!!
lmk when you find a solution or implement the onPersistentData event or I dunno
will do!
lmao
ok so update on the event stuff
theres an entity.swinging method you may also be able to work with and is what geckolib also does for a duel wielding attack animation
might be worth considering
thanks!
I hope my request will be implementable
no not that
okay thanks!
aight this will be in the next update js StartupEvents.registry('entity_type', event => { event.create('wyrm', 'entityjs:animal') .onLivingJump(entity => { entity.triggerAnimation('examplecontroller', 'triggername') }) .addTriggerableAnimationController('examplecontroller', 5, 'triggername', 'spawn', 'loop') })
well, something like it
wait so
still confused
I burnt my brain a little in https://discord.com/channels/303440391124942858/1212058613158387764 don't mind me
this way you can play any animation right off the entity js entity.triggerAnimation('examplecontroller', 'triggername')
np
whenever you want 
so I can make thing that I want?
don't bother explaning probably forget anyways
should
I will wait for release
thanks!
you are the only one that helps me so when you're time can you look at https://discord.com/channels/303440391124942858/1212058613158387764 ?
I am really confused
this is not the version that adds "addTriggerableAnimationController" I assume
i havent posted the update yet
still figuring out some things like making it compatible with other animation controllers ect
ill let you know when its posted, might be tomorrow i assume if all goes well
okay!!
just uploaded the new versions, they should be up soon
heres the new wiki page dedicated to setting up animations with the new methods https://github.com/liopyu/EntityJS/wiki/Entity-Animations
and since it's a literal trigger you can call anywhere it should be a lot better than setting it with persistent data, for example you would add the triggerable animation controller on startup like so js StartupEvents.registry('entity_type', event => { event.create('wyrm', 'entityjs:animal') .addTriggerableAnimationController('exampleController', 5, 'spawn', 'spawning', 'play_once') });
which you can then call anywhere you need like this js EntityEvents.hurt('kubejs:wyrm',event => { event.entity.triggerAnimation('exampleController', 'spawning'); }) this includes for example the forge livingattack event
oh god thanks!
will try now
well @dawn oar is there a way to parse entity by it's id?
nah lets say I registered a command
event.entity.uuid i think

thanks!!
so I will put my models animations to 'spawn', 'spawning' part?
how does it work actually
so lets take this for example js .addTriggerableAnimationController('exampleController', 5, 'spawn', 'spawning', 'play_once')
its pretty much the same as adding a normal controller except instead of setting the callback predicate function you will need to specify the animation name (in this case the animation name in my animations.json is 'spawn') the trigger identifier(a unique name to identify the trigger which you will be able to use anywhere) and the loop type(im using 'play_once' here but you have 'loop', 'default', 'play_and_hold' as well)
it says all this on the wiki too
oh so basicly;
.addTriggerableAnimationController('controllername', animationtick(?), 'modelsanimationname', 'entityjsanimationname', 'animationtype')```
I can work with that
if you want it to default to the loop type specified in the json you'd just put "default"
thanks!!
np
can I register more than 1 animations to a controller?
Damn I should read the wiki I guess
lemme look
it depends on if you want to be able to use the triggerable animation anywhere or not, this method you need to add a new controller for every triggerable animation to be able to use it outside of the entity methods
however you can do this if you only want to use the triggerable animations within the entity's methods like so ```js
.addAnimationController('exampleController1', 5, event => {
// Add triggerable animation named "spawning" with loop type "default"
event.addTriggerableAnimation('spawn', 'spawning', 'default');
// Play "idle" animation if the entity is moving
if (event.isMoving()) {
event.thenPlay("idle");
}
return true; // Indicate successful animation setup
})```
I mean I want to manage all my triggerable animations under 1 controllers name
here you can add multiple to one controller through this under the same controller name js event.addTriggerableAnimation('spawn', 'spawning', 'default'); though you probably just want to make a new controller for every animation because thats how normal geckolib does it anyways
this is using the js .addAnimationController method though
oh and "ReferenceError: "ServerLevel" is not defined"
ServerEvents.commandRegistry(e => {
const { commands: Commands, arguments: Arguments } = e
let entity = ServerLevel.getEntity(UUID)
e.register(Commands.literal('anim')
.requires(s => s.hasPermission(2))
.then(Commands.argument('target', Arguments.ENTITY.create(e))
.executes(c => anim(Arguments.ENTITY.getResult(c, 'target')))
)
)
let anim = (entity) => {
entity.triggerAnimation('kickController', 'kick');
}
})
well ofcourse thatd be undefined
you have to get the server level through the entity
entity.level
its not just ServerLevel 
fair enough
its the level resourcekey not dimension mb
PlayerEvents.tick(event => {
event.entity.server.getLevel(event.entity.level.dimensionKey)
})```
ServerEvents.commandRegistry(e => {
const { commands: Commands, arguments: Arguments } = e
e.register(Commands.literal('anim')
.requires(s => s.hasPermission(2))
.then(Commands.argument('target', Arguments.STRING.create(e))
.executes(c => anim(Arguments.STRING.getResult(c, 'target')))
)
)
let anim = (entity) => {
let entity2 = e.server.level.getLevel().getEntity(entity)
entity2.triggerAnimation('kickController', 'kick');
}
})```
well it seems it is not working and no error logs
model is registered and shows but
well as I explained because of creating compability with my other tools
yeah the plugin
what does this plugin do?
I know it is not supported so I'm asking as a command
btw whats your startup script look like
well it's a custom plugin to creating custom bosses through config file
think like that
well it's a long ass file but here is the only model part;
StartupEvents.registry('entity_type', event => {
event.create('reina:mfwardenarcher', 'entityjs:animal')
.addTriggerableAnimationController('kickController', 5, 'kick', 'kick', 'play_once')
.addAnimationController('exampleController', 5, event => {
event.thenLoop('idle');
return true;
});
})```
well I got everything wrong didn't I

im honestly not the guy to go to for commands
what i would do is make it do something simple and make sure it's working properly
like have it kill the entity for example
also the entity is an instance so if you dont have the actual entity instance then it prob wouldnt work anyways
and what i mean by this is for example js EntityEvents.hurt(event => { event.entity }) has the instance of the entity being hurt here
but I get the entity through server level
and i know youre getting the entity through uuid but make sure thats the right entity
yeah you're right
yes so console log that and make sure its the right one
letme test
kk
thanks for advice
oh wait there is a command problem it seems
let entity2 = e.server.level.getLevel().getEntity(entity)```
this part is wrong
there is no e.server.level
oh yeah
since I need to get entities server level
well yeah
function getEntityByID(uuid) {
let entities = Utils.server.getEntities();
for (let i = 0; i < entities.size(); i++) {
console.log(entities.get(i).uuid);
if (entities.get(i).uuid == uuid) {
return entities.get(i)
}
}
}
ServerEvents.commandRegistry(e => {
const { commands: Commands, arguments: Arguments } = e
e.register(Commands.literal('anim')
.requires(s => s.hasPermission(2))
.then(Commands.argument('target', Arguments.STRING.create(e))
.executes(c => anim(Arguments.STRING.getResult(c, 'target')))
)
)
let anim = (entity) => {
let entity2 = getEntityByID(entity)
entity2.triggerAnimation('kickController', 'kick');
}
})
I'm left with this now
Cannot call method "triggerAnimation" of undefined
yeah because I'm a total idiot
this is the main problem now
^

the entity is undefined
in what instance would you use the command
in game?
you would run the command in game to make an entity animate but how would you know their uuid in the first place
earlier you were talking about using persistent data to trigger it
all through a command
well now
and now i want to know how would you execute the command in the first place 
ServerEvents.commandRegistry(e => {
const { commands: Commands, arguments: Arguments } = e
e.register(Commands.literal('anim')
.requires(s => s.hasPermission(2))
.then(Commands.argument('target', Arguments.ENTITY.create(e))
.executes(c => anim(Arguments.ENTITY.getResult(c, 'target')))
)
)
let anim = (entity) => {
entity.triggerAnimation('kickController', 'kick');
}
})```
I can get entity through args
is there some place in configs where you need a command to do something?
yeah
also you should link the plugin here so i can take a look
well it's custom made from my team
and what does it do exactly
well you see we are using this plugin to manage mobs AI, skills etc.
will explain a bit later wait
maybe
though you'll have to listen to the pdata somehow
you're trying to do all this through the server and no startup scripts?
are startup scripts allowed or nah
allowed
forge right
yes
.tick(entity => global.entitytick(entity)
/**
*
* @param {Internal.LivingEntity} event
*/
global.entitytick = entity => {
if (entity.persistentData.kick == 1){
entity.persistentData.kick = 0
entity.triggerAnimation('kickController', 'kick');
}
}```
this way it'll literally act as a trigger detecting on the entity tick if it's persistent data is 1 or not
although crap we can just do this off the entity tick 
sec
oh okay then I can work with that
although setting it up on the actual entity itself on lets say the doautoattackontouch method would do the same thing though you said earlier you werent trying to do ai at all?
well you're entirely right I can manage this all by only kubejs itself but
this for example this would add the attack goal to the mob and they would attack cows on sight #off-topic message
[➤](#off-topic message)
EntityJSEvents.addGoalSelectors('kubejs:wyrm', e => {
e.meleeAttack(4, 1, true)
})
EntityJSEvents.addGoals("kubejs:wyrm", event => {
let Cow = Java.loadClass('net.minecraft.world.entity.animal.Cow')
event.hurtByTarget(1, [Cow], true, [Cow])
event.nearestAttackableTarget(2, Cow, 5, false, false, entity => {
return entity.age < 500
})
})``` in server scripts
I dunno if you ask me even I want to make this only forge server
but however my dev team decided to make a hybrid server
i would tell them that this is better done in the startup upon entity creation
it'd definately be more performant than having command overhead too
they woudln't listen..

they dont know the power of kubejs i assume
and if they're trying to do everything through commands then thats even worse if you ask me
no offense of course
i would show them that ai is entirely possible through this mod
up to you tho
well you're right since I'm kinda head of dev
don't know if I can make them listen
they have something working right now and only need is make entity animation through, pdata or commands
ok, try the pdata script i sent you and see if it works
you still have the pdata command right
should just have to set the pdata to 1 then it'll trigger and set it back to 0
although you'll have to set the pdata to 0 upon entityevents.spawned to initiate it first ofcourse
will try thanks
also it was dumb i asked if startup scripts were allowed earlier 💀

entityjs is startup script 
hmm so
this goes to startupevents?
yeah it was a stupid question
its the entity tick method
seems like we're both asking stupid questions 
but yeah you'd override the tick method in your entity
so since it is global I can live update it through reload?
[23:01:40] [ERROR] ! reina_startup.js#238: TypeError: Cannot find function tick in object {}.
send script
uhhh
global.tick(entity => global.entitytick(entity))
/**
*
* @param {Internal.LivingEntity} event
*/
global.entitytick = entity => {
if (entity.persistentData.kick == 1){
entity.persistentData.kick = 0
entity.triggerAnimation('kickController', 'kick');
}
}```
wheres your entity even
[23:04:04] [ERROR] ! reina_startup.js#244: Error in 'StartupEvents.registry': TypeError: Cannot find function tick in object {}.
@dawn oar still same 💀
you didnt get rid of the other script did you
the global.tick what even is that used for here
delete it 
deleted
ok now try
this should work
nope
global.tick(entity => global.entitytick(entity))``` delete this
send the script
??sendcode
Send your code here instead of a screenshot
It makes it easier to diagnose your code and help you fix it or make the required changes/additions.
StartupEvents.registry('entity_type', event => {
event.create('reina:mfwardenarcher', 'entityjs:animal')
.addTriggerableAnimationController('kickController', 5, 'kick', 'kick', 'play_once')
.addAnimationController('exampleController', 5, event => {
event.thenLoop('idle');
return true;
});
})
global.tick(entity => global.entitytick(entity))
/**
*
* @param {Internal.LivingEntity} event
*/
global.entitytick = entity => {
if (entity.persistentData.kick == 1){
entity.persistentData.kick = 0
entity.triggerAnimation('kickController', 'kick');
}
}```
sorry it was for you seing the lines
StartupEvents.registry('entity_type', event => {
event.create('reina:mfwardenarcher', 'entityjs:animal')
.tick(entity => global.entitytick(entity)).addTriggerableAnimationController('kickController', 5, 'kick', 'kick', 'play_once')
.addAnimationController('exampleController', 5, event => {
event.thenLoop('idle');
return true;
});
})
/**
*
* @param {Internal.LivingEntity} event
*/
global.entitytick = entity => {
if (entity.persistentData.kick == 1){
entity.persistentData.kick = 0
entity.triggerAnimation('kickController', 'kick');
}
}```
tick goes where all the other method overrides go
oh sorry when I see the .tick in here I thought it was something..
lol
well it seems now my animations are corrupted
but fixed the main problem I guess
yeah so
I deleted the idle part
now it works
I guess it combines 2 animations together
are we sure this was the problem?
no im just sending that so you can use it if needed
test it out in the normal controller and make sure its not just some weird thing with the triggerableanimationcontroller
yeah as I said
[➤](#1211848958889172992 message) I deleted the idle part
yeah it plays 2 animations together
interesting
it shouldnt do that 
try the triggerable animation in a normal EntityEvents.hurt server script and see if it works there when you punch it
exampleController plays everytime even an animation exists
maybe that's the problem
try going off the same controller maybe
hm?
StartupEvents.registry('entity_type', event => {
event.create('reina:mfwardenarcher', 'entityjs:animal')
.tick(entity => global.entitytick(entity))
.addAnimationController('exampleController', 5, event => {
event.addTriggerableAnimation('kick', 'kick', 'default');
event.thenLoop('idle');
return true;
})
.onAddedToWorld(entity => {
entity.persistentData.kick = 0
})
//.addTriggerableAnimationController('kickController', 5, 'kick', 'kick', 'play_once')
})
/**
*
* @param {Internal.LivingEntity} event
*/
global.entitytick = entity => {
if (entity.persistentData.kick == 1) {
entity.persistentData.kick = 0
entity.triggerAnimation('exampleController', 'kick');
}
}``` something like this
make sure in the tick event its named 'exampleController'
lets see
and if that doesnt work then try only playing the idle animation if the kick animation isnt playing like this js .addAnimationController('exampleController', 5, event => { event.addTriggerableAnimation('kick', 'kick', 'default'); if (event.getController().getCurrentAnimation().animation().name() == 'kick') return event.thenLoop('idle') return true; })
also i would put the animation controller into a global event too so you can /kubejs reload
this works
guess they have to be in the same controller then
yeah I guess so
for this instance anyways
i tested the other controller out and it works, wonder why its not working here 
ill have to do more testing with it i guess
then ill be your best friend
bet bet
so does this solve the ticket?
if you have anymore questions feel free to leave it open
sounds good 
oh and
about the head tracking
I didn't understand how it works actually
I want to make it same as zombie or any entities behaviour
yeah
//addGoalSelectors Server Script
EntityJSEvents.addGoalSelectors('kubejs:wyrm', e => {
let Player = Java.loadClass('net.minecraft.world.entity.player.Player')
//You have the ability to add pre built goals like so to your entity. (with more to come!)
e.panic(1, 0.5)
e.floatSwim(1)
e.meleeAttack(4, 1, true)
e.leapAtTarget(3, 0.4)
e.waterAvoidingRandomStroll(5, 0.4, 0.8)
e.lookAtEntity(6, Player, 8, 0.8, false)
e.randomLookAround(7)
})
the look at entity is going by class
oh wait yeah sorry
let Player = Java.loadClass('net.minecraft.world.entity.player.Player')
e.lookAtEntity(6, Player, 8, 0.8, false)```we're loading the player class so any instance of the player will be subject to be looked at
i might change this later so people can just type in 'player', 'mob' ect
oh wait how does geckolib knows the entities head bone
it turns the whole entity if the head is not specified i assume
you'll have to test that out
yeah
Paste version of message.txt from @reef briar
StartupEvents.registry('entity_type', event => {
event.create('reina:mfwardenarcher', 'entityjs:animal')
.tick(entity => global.entitytick(entity))
.addAnimationController('reinaController', 5, event => {
event.addTriggerableAnimation('kick', 'kick', 'default');
event.addTriggerableAnimation('death', 'death', 'default');
event.addTriggerableAnimation('attack', 'attack', 'default');
if (event.isMoving()) {
event.thenLoop("walk");
}
else {
event.thenLoop('idle');
}
return true;
})
.onAddedToWorld(entity => {
entity.persistentData.anim = 0
})
})
/**
*
* @param {Internal.LivingEntity} event
*/
global.entitytick = entity => {
if (entity.persistentData.anim !== 0) {
entity.triggerAnimation('reinaController', entity.persistentData.anim);
entity.persistentData.anim = 0
}
}```
it only crashed on server
also comment out the triggeranimation line while you do that so it doesnt crash
without server it runs
^
on the server pls
okay
is this on the server?
yes
try manually setting it to the string "attack"
manually?
entity.triggerAnimation('reinaController', 'attack');
oh in the code
yea
Paste version of message.txt from @reef briar
💀
i was about to say id hope that isnt gonna be a thing on a server 
if it was I was going to smack my devs to add the mixin to fix it
yes
ye I know that
what about hitboxes then?
ah
no no no no
oh
just want to increase size of current one
then do .sized(3,3) or something
yea
dont forget theres the full example entity on the wiki page too
should have every single overridable method on there
gosh there is no way to get heigh and width from blockbench right?
letme search in internet
you could also just summon it and compare it to blocks in game
oor
thats prob what i'd do
yes
pretty sure
looks like it
also its width, height, not height width like i said earlier apparently
lets record a video and hype the chat 😎
ohh
thanks!
??closeticket
Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.
Do you have any other questions regarding your issue? Feel free to ask!
Note: You generally should create a new post for unrelated issues.




