Started by
ninjawizard1234
on
Topic category: Help with Minecraft modding (Java Edition)
Hey guys on GeckoLib, you can set animations for both Walking and Flying, i want my birds to fly most of time and land sometimes, but the thing is if i set to Flying Entity it only flies and pretty much dont land, if i set regular entity, and set Fly behavior, it only flies to climb blocks, someone knows how to edit the code to change that?
thanks!
i think tihs is the part we need to edit:
private PlayState movementPredicate(AnimationState event) {
if (this.animationprocedure.equals("empty")) {
if ((event.isMoving() || !(event.getLimbSwingAmount() > -0.15F && event.getLimbSwingAmount() < 0.15F)) && this.onGround()) {
return event.setAndContinue(RawAnimation.begin().thenLoop("walk"));
}
if (!this.onGround()) {
return event.setAndContinue(RawAnimation.begin().thenLoop("fly"));
}
return event.setAndContinue(RawAnimation.begin().thenLoop("idle"));
}
return PlayState.STOP;
}
im trying to edit this part so it spend 50% of the time on the Ground and 50% on the Air, no luck so far