hey guys, i'm new here and new to modding.
I need help with my mod, the mod works but the armor visibility works on everyone and I want to make that it affects only the local player.
my mixin:
@Mixin(ArmorFeatureRenderer.class)
public abstract class ArmorHideMixin {
@Inject(method = "renderArmor", at = @At("HEAD"), cancellable = true)
private void onRender(MatrixStack matrices, VertexConsumerProvider vertexConsumers,
ItemStack stack, EquipmentSlot slot,
int light, BipedEntityModel<?> armorModel, CallbackInfo ci) {
MinecraftClient client = MinecraftClient.getInstance();
if (client.player != null && HideArmor.isHidden) {
ci.cancel();
}
}
}