Posted November 10, 20222 yr I'm using geckoLib, I'd like to add an attack animation to an entity. Spoiler public class DrevoEntity extends IronGolem implements NeutralMob, IAnimatable { ... private <E extends IAnimatable> PlayState predicate (AnimationEvent<E> event){ if (//Here//){ event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.drevo.attack")); return PlayState.CONTINUE; } if(event.isMoving()){ event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.drevo.walk")); return PlayState.CONTINUE; } return PlayState.CONTINUE; } ... The IronGolem#doHurtTarget methods associated with the entity fire when it attacks, but I'm not sure if I can use it somehow?
November 10, 20222 yr I don't know why you keep asking geckolib questions here? These are the forge support forums. You should ask wherever geckolib provides support or I believe there is a third party modding channel on forge's discord. Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.