package de.winniepat.citrus.mixins;

import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.entity.feature.CapeFeatureRenderer;
import net.minecraft.util.Identifier;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.*;

@Mixin(CapeFeatureRenderer.class)
public class CapeTransparencyMixin {

    @Redirect(
            method = "render*",
            at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/RenderLayer;getEntitySolid(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/RenderLayer;")
    )
    private RenderLayer swapToTranslucent(Identifier texture) {
        return RenderLayer.getEntityTranslucent(texture);
    }
}
