Geckolib-forge-1.19-3.1.40.jar Apr 2026

Item Class public class MagicStaffItem extends Item implements IAnimatable private AnimationFactory factory = new AnimationFactory(this); public MagicStaffItem(Properties properties) super(properties);

// In your main mod class public static final EntityType<MyMobEntity> MY_MOB = Registry.register( Registry.ENTITY_TYPE, new ResourceLocation("yourmodid", "my_mob"), EntityType.Builder.of(MyMobEntity::new, MobCategory.CREATURE) .sized(0.9f, 1.3f) .build("my_mob") ); // Client setup @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) public class ClientEvents @SubscribeEvent public static void registerRenderers(EntityRenderersEvent.RegisterRenderers event) event.registerEntityRenderer(MY_MOB, MyMobRenderer::new); geckolib-forge-1.19-3.1.40.jar

public MyMobEntity(EntityType<? extends PathfinderMob> type, Level world) super(type, world); Animation Triggers Play an animation once on attack

@Override public AnimationFactory getFactory() return factory; MY_MOB = Registry.register( Registry.ENTITY_TYPE

Extend GeoItemRenderer and register it using ItemRendererGeckoLib . 3. Animation Triggers Play an animation once on attack @Override public boolean hurt(DamageSource source, float amount) if (!level.isClientSide) AnimationController<?> controller = this.getAnimationData().getAnimationControllers().get("controller"); controller.markAnimationDone(); // reset controller.setAnimation(new AnimationBuilder().addAnimation("animation.mymob.attack", false)); return super.hurt(source, amount);

@Override public ResourceLocation getAnimationFileLocation(MyMobEntity object) return new ResourceLocation("yourmodid", "animations/mymob.animation.json");

gtag('config', 'AW-802439404');