Geckolib - Flying Birds Never Land

Started by ninjawizard1234 on

Topic category: Help with modding (Java Edition)

Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Geckolib - Flying Birds Never Land

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;
	}
Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
im trying to edit this part…
Thu, 11/23/2023 - 01:04

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