Skip to content

Commit

Permalink
- Don't throw errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
KasumiNova committed Jul 30, 2024
1 parent 4a04cd0 commit 1af9504
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package github.kasuminova.mmce.client.gui.util;

import com.github.bsideup.jabel.Desugar;
import com.google.common.base.Preconditions;
import github.kasuminova.mmce.client.gui.widget.base.WidgetGui;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.texture.TextureManager;
Expand Down Expand Up @@ -109,7 +108,11 @@ public void render(@Nullable final ResourceLocation customTexRes, final RenderPo
if (texRes != null) {
bind(textureManager);
} else {
bind(textureManager, Preconditions.checkNotNull(customTexRes, "texRes is null, but customTexRes is null too!"));
if (customTexRes != null) {
bind(textureManager, customTexRes);
} else {
return;
}
}
gui.drawTexturedModalRect(renderPos.posX(), renderPos.posY(), texX, texY, width, height);
}
Expand Down Expand Up @@ -163,7 +166,11 @@ public void render(@Nullable final ResourceLocation customTexRes, final RenderPo
if (texRes != null) {
bind(textureManager);
} else {
bind(textureManager, Preconditions.checkNotNull(customTexRes, "texRes is null, but customTexRes is null too!"));
if (customTexRes != null) {
bind(textureManager, customTexRes);
} else {
return;
}
}
gui.drawTexturedModalRect(renderPos.posX(), renderPos.posY(), texX, texY, renderSize.width(), renderSize.height());
}
Expand Down

0 comments on commit 1af9504

Please sign in to comment.