mixin syntax error (?)
gengyoubo opened this issue ยท 2 comments
@Shadow public abstract void syncPropertyModel();
public void syncPropertyModel(T entity) {
if (this instanceof AdvancedHumanoidModelInterface modelInterface)
modelInterface.getAnimator(entity).writePropertyModel(this);
}
Why use the abstract keyword to refer to this public method?
And even abstract methods should be implemented first instead of being used directly
this.syncPropertyModel();
@Inject(method = "canBeCustomleashed", at = @At("HEAD"), cancellable = true)
protected static void denyTransfurredPlayers(Mob mobEntity, Player player, ItemStack stack, CallbackInfoReturnable<Boolean> cir) {
if (mobEntity instanceof ChangedEntity changedEntity && changedEntity.getUnderlyingPlayer() != null)
cir.setReturnValue(false);
}
Shouldn't public methods be private?