Skip to content

Commit

Permalink
do not render vampire overlay if texture is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheaterpaul committed May 14, 2023
1 parent 74bca23 commit 9fd088a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.mojang.blaze3d.vertex.PoseStack;
import de.teamlapen.vampirism.client.renderer.entity.ConvertedCreatureRenderer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.EntityModel;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.RenderLayerParent;
Expand Down Expand Up @@ -32,7 +33,8 @@ public VampireEntityLayer(@NotNull RenderLayerParent<T, U> entityRendererIn, Res

@Override
public void render(@NotNull PoseStack matrixStack, @NotNull MultiBufferSource iRenderTypeBuffer, int i, @NotNull T entity, float v, float v1, float v2, float v3, float v4, float v5) {
if (!entity.isInvisible() && (!checkIfRender || ConvertedCreatureRenderer.renderOverlay)) {
//noinspection ConstantValue
if (!entity.isInvisible() && (!checkIfRender || ConvertedCreatureRenderer.renderOverlay) && Minecraft.getInstance().textureManager.getTexture(overlay) != null) {
renderColoredCutoutModel(this.getParentModel(), overlay, matrixStack, iRenderTypeBuffer, i, entity, 1, 1, 1);
}
}
Expand Down

0 comments on commit 9fd088a

Please sign in to comment.