Skip to content

Commit

Permalink
Added ageAsVariant for handsBusy check, when TF anims are disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
LtxProgrammer committed Nov 28, 2024
1 parent 99ae9fc commit ae27d4a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public LocalTransfurVariantInstance(TransfurVariant<T> parent, LocalPlayer host)
protected void tickTransfurProgress() {
super.tickTransfurProgress();

if (transfurProgression < 1f) {
if (transfurProgression < 1f || this.ageAsVariant < 30) {
((LocalPlayerAccessor)host).setHandsBusy(true);
} else if (host.getVehicle() == null && host.isHandsBusy()) {
((LocalPlayerAccessor)host).setHandsBusy(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,6 @@ protected void getSwimSound(CallbackInfoReturnable<SoundEvent> ci) {
}
}

@Inject(method = "hurt", at = @At("HEAD"), cancellable = true)
public void orNotHurt(DamageSource p_36154_, float p_36155_, CallbackInfoReturnable<Boolean> cir) {
ProcessTransfur.ifPlayerTransfurred(EntityUtil.playerOrNull(this), variant -> {
if (variant.ageAsVariant < 30)
cir.cancel();
});
}

@Inject(method = "createAttributes", at = @At("RETURN"))
private static void addChangedAttributes(CallbackInfoReturnable<AttributeSupplier.Builder> cir) {
cir.getReturnValue().add(ChangedAttributes.TRANSFUR_DAMAGE.get(), 3.0D);
Expand Down

0 comments on commit ae27d4a

Please sign in to comment.