Skip to content

Commit

Permalink
fix status effect texture
Browse files Browse the repository at this point in the history
closes #37
  • Loading branch information
deirn committed Nov 13, 2021
1 parent 947507b commit 2c4deb9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.awt.Dimension;

import com.mojang.blaze3d.systems.RenderSystem;
import mcp.mobius.waila.api.ICommonAccessor;
import mcp.mobius.waila.api.ITooltipRenderer;
import net.minecraft.client.MinecraftClient;
Expand Down Expand Up @@ -44,7 +45,7 @@ public void draw(MatrixStack matrices, NbtCompound data, ICommonAccessor accesso
StatusEffect statusEffect = StatusEffect.byRawId(data.getInt(S_ID + i));
if (statusEffect != null) {
Sprite sprite = manager.getSprite(statusEffect);
MinecraftClient.getInstance().getTextureManager().bindTexture(sprite.getAtlas().getId());
RenderSystem.setShaderTexture(0, sprite.getAtlas().getId());
DrawableHelper.drawSprite(matrices, x + 20 * i, y, 0, 18, 18, sprite);
textRenderer().drawWithShadow(matrices, lv, x + 20 + (20 * i) - textRenderer().getWidth(lv), y + 20 - textRenderer().fontHeight, 0xFFFFFF);
} else {
Expand Down

0 comments on commit 2c4deb9

Please sign in to comment.