Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void setCustomAnimations(Snail animatable, long instanceId, @Nullable Ani
eyes.setScaleZ(1.0F);
}

if (!animatable.isClimbing() || !animatable.canHide()) {
if (!animatable.isNaturalistClimbing() || !animatable.canHide()) {
leftEye.setRotX(extraDataOfType.headPitch() * Mth.DEG_TO_RAD);
leftEye.setRotY(extraDataOfType.netHeadYaw() * Mth.DEG_TO_RAD);
rightEye.setRotX(extraDataOfType.headPitch() * Mth.DEG_TO_RAD);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public AnimatableInstanceCache getAnimatableInstanceCache() {
private <E extends Snail> PlayState predicate(final @NotNull AnimationState<E> event) {
if (this.getDeltaMovement().horizontalDistanceSqr() > 1.0E-6) {
event.getController().setAnimation(CRAWL);
} else if (this.isClimbing()){
} else if (this.isNaturalistClimbing()){
event.getController().setAnimation(CLIMB);
} else {
event.getController().setAnimation(IDLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ public AnimatableInstanceCache getAnimatableInstanceCache() {
if (this.isSleeping()) {
event.getController().setAnimation(SLEEP);
return PlayState.CONTINUE;
} else if (this.isClimbing()) {
} else if (this.isNaturalistClimbing()) {
event.getController().setAnimation(CLIMB);
return PlayState.CONTINUE;
} else if (!(event.getLimbSwingAmount() > -0.04F && event.getLimbSwingAmount() < 0.04F)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected void defineSynchedData() {
public void tick() {
super.tick();
if (!this.level().isClientSide) {
this.setClimbing(this.horizontalCollision);
this.setNaturalistClimbing(this.horizontalCollision);
}
if (this.horizontalCollision && this.onClimbable()) {
this.setDeltaMovement(this.getDeltaMovement().x, this.getDeltaMovement().y * this.getClimbSpeedMultiplier(), this.getDeltaMovement().z);
Expand All @@ -41,16 +41,16 @@ public void tick() {

@Override
public boolean onClimbable() {
return this.isClimbing();
return this.isNaturalistClimbing();
}

public boolean isClimbing() {
public boolean isNaturalistClimbing() {
return (this.entityData.get(CLIMB_FLAG) & 1) != 0;
}

public void setClimbing(boolean pClimbing) {
public void setNaturalistClimbing(boolean climbing) {
byte flag = this.entityData.get(CLIMB_FLAG);
if (pClimbing) {
if (climbing) {
flag = (byte)(flag | 1);
} else {
flag = (byte)(flag & -2);
Expand Down