Skip to content

Commit 718156c

Browse files
authored
Merge pull request #3 from itsmeowForks/worldgen-lock-fix
Fix Hoatzin worldgen thread lock
2 parents efc4862 + b890fb6 commit 718156c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/cybercat5555/faunus/core/entity/livingEntity/HoatzinEntity.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ public void registerControllers(ControllerRegistrar controllers) {
7272
}
7373

7474
protected <E extends HoatzinEntity> PlayState idleAnimController(final AnimationState<E> state) {
75-
if (state.isMoving() && isOnGround()) {
75+
if (state.isMoving() && isBlockBelow()) {
7676
state.setAndContinue(WALKING_ANIM);
77-
} else if (!isOnGround()) {
77+
} else if (!isBlockBelow()) {
7878
state.setAndContinue(FLY_ANIM);
79-
} else if (!state.isMoving() && isOnGround()) {
79+
} else if (!state.isMoving() && isBlockBelow()) {
8080
state.setAndContinue(IDLE_ANIM);
8181
}
8282

@@ -91,8 +91,7 @@ public static DefaultAttributeContainer.Builder createMobAttributes() {
9191
.add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.6f);
9292
}
9393

94-
@Override
95-
public boolean isOnGround() {
94+
public boolean isBlockBelow() {
9695
return !this.getWorld().getBlockState(getBlockPos().down()).isAir();
9796
}
9897

0 commit comments

Comments
 (0)