content: package com.github.alexthe666.rats.client.render.entity.layer;
  
  import com.github.alexthe666.rats.RatsMod;
  import com.github.alexthe666.rats.registry.RatsEffectRegistry;
  import com.github.alexthe666.rats.server.entity.rat.AbstractRat;
  import com.mojang.blaze3d.vertex.PoseStack;
  import net.minecraft.client.model.EntityModel;
  import net.minecraft.client.renderer.MultiBufferSource;
  import net.minecraft.client.renderer.RenderType;
  import net.minecraft.client.renderer.entity.RenderLayerParent;
  import net.minecraft.client.renderer.entity.layers.RenderLayer;
  import net.minecraft.client.renderer.texture.OverlayTexture;
  import net.minecraft.resources.ResourceLocation;
  import net.minecraft.world.entity.LivingEntity;
  
  public class PlagueLayer<T extends LivingEntity, M extends EntityModel<T>> extends RenderLayer<T, M> {
  
  	private static final RenderType TEXTURE = RenderType.entityTranslucent(new ResourceLocation(RatsMod.MODID, "textures/misc/plague_overlay.png"));
  
  	public PlagueLayer(RenderLayerParent<T, M> parent) {
  		super(parent);
  	}
  
  	@Override
  	public void render(PoseStack stack, MultiBufferSource buffer, int light, T entity, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) {
  		if (!(entity instanceof AbstractRat) && entity.hasEffect(RatsEffectRegistry.PLAGUE.get())) {
  			this.getParentModel().renderToBuffer(stack, buffer.getBuffer(TEXTURE), light, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
  		}
  	}
  }
  