Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @OnlyIn(Dist.CLIENT)
- @Mixin(ItemRenderer.class)
- public class MixinItemRenderer {
- @WrapOperation(
- method = "Lnet/minecraft/client/renderer/entity/ItemRenderer;renderGuiItem(Lnet/minecraft/world/item/ItemStack;IILnet/minecraft/client/resources/model/BakedModel;)V",
- at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;setShaderColor(FFFF)V"))
- private void injectRenderer(RenderSystem instance, float pRed, float pGreen, float pBlue, float pAlpha, Operation<Void> original, ItemStack pStack, int pX, int pY, BakedModel pBakedModel) {
- if (ItemUtils.isBroken(pStack)) {
- original.call(instance, 0.0f, pGreen, pBlue, pAlpha);
- }
- else original.call(instance, pRed, pGreen, pBlue, pAlpha);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement