Some simple fixes
This commit is contained in:
parent
08f75889ec
commit
2f07306d90
6 changed files with 13 additions and 5 deletions
|
@ -58,7 +58,7 @@ public class ItemStackRenderer implements HudRenderCallback {
|
|||
if (!ItemStackRenderManager.RENDER_QUEUE.isEmpty()) {
|
||||
ItemStack itemStack = ItemStackRenderManager.RENDER_QUEUE.remove();
|
||||
Identifier id = Registries.ITEM.getId(itemStack.getItem());
|
||||
drawContext.drawText(MinecraftClient.getInstance().textRenderer, "Rendering " + id + ", " + ItemStackRenderManager.RENDER_QUEUE.size() + " items left", 5, 5, -1, true);
|
||||
drawContext.drawText(MinecraftClient.getInstance().textRenderer, "Rendering " + id + ", " + ItemStackRenderManager.RENDER_QUEUE.size() + " items left", 5, 5, -1, false);
|
||||
export(id, itemStack);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -305,7 +305,7 @@ public class GuiBase<T extends ScreenHandler> extends HandledScreen<T> {
|
|||
factorX = this.x;
|
||||
factorY = this.y;
|
||||
}
|
||||
drawContext.drawText(MinecraftClient.getInstance().textRenderer, text, x + factorX, y + factorY, colour, true);
|
||||
drawContext.drawText(MinecraftClient.getInstance().textRenderer, text, x + factorX, y + factorY, colour, false);
|
||||
RenderSystem.setShaderColor(1F, 1F, 1F, 1F);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public class RedstoneConfigGui {
|
|||
int spread = configuration.getElements().size() == 3 ? 27 : 18;
|
||||
for (RedstoneConfiguration.Element element : configuration.getElements()) {
|
||||
drawContext.drawItem(element.getIcon(), x - 3, y + (i * spread) - 5);
|
||||
drawContext.drawText(guiBase.getTextRenderer(), Text.translatable("reborncore.gui.fluidconfig." + element.getName()), x + 15, y + (i * spread), -1, true);
|
||||
drawContext.drawText(guiBase.getTextRenderer(), Text.translatable("reborncore.gui.fluidconfig." + element.getName()), x + 15, y + (i * spread), -1, false);
|
||||
|
||||
boolean hovered = withinBounds(guiBase, mouseX, mouseY, x + 92, y + (i * spread) - 2, 63, 15);
|
||||
int color = hovered ? 0xFF8b8b8b : 0x668b8b8b;
|
||||
|
|
|
@ -298,7 +298,7 @@ public class ElementBase {
|
|||
public void drawText(DrawContext drawContext, GuiBase<?> gui, Text text, int x, int y, int color) {
|
||||
x = adjustX(gui, x);
|
||||
y = adjustY(gui, y);
|
||||
drawContext.drawText(gui.getTextRenderer(), text, x, y, color, true);
|
||||
drawContext.drawText(gui.getTextRenderer(), text, x, y, color, false);
|
||||
}
|
||||
|
||||
public void drawSprite(DrawContext drawContext, GuiBase<?> gui, ISprite iSprite, int x, int y) {
|
||||
|
|
|
@ -111,7 +111,7 @@ public class GuiBuilder {
|
|||
}
|
||||
|
||||
public void drawText(DrawContext drawContext, GuiBase<?> gui, Text text, int x, int y, int color) {
|
||||
drawContext.drawText(gui.getTextRenderer(), text, x, y, color, true);
|
||||
drawContext.drawText(gui.getTextRenderer(), text, x, y, color, false);
|
||||
}
|
||||
|
||||
public void drawProgressBar(DrawContext drawContext, GuiBase<?> gui, double progress, int x, int y) {
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.text.Text;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
|
@ -56,6 +57,11 @@ public class GuiIDSU extends GuiBase<BuiltScreenHandler> {
|
|||
super.drawForeground(drawContext, mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
MatrixStack matrices = drawContext.getMatrices();
|
||||
|
||||
matrices.push();
|
||||
matrices.scale(0.6f, 0.6f, 1.0f);
|
||||
|
||||
Text text = Text.literal(PowerSystem.getLocalizedPowerNoSuffix(idsu.getEnergy()))
|
||||
.append("/")
|
||||
.append(PowerSystem.getLocalizedPowerNoSuffix(idsu.getMaxStoredPower()))
|
||||
|
@ -64,6 +70,8 @@ public class GuiIDSU extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
drawCentredText(drawContext, text, 35, 0, 58, layer);
|
||||
|
||||
matrices.pop();
|
||||
|
||||
builder.drawMultiEnergyBar(drawContext, this, 81, 28, (int) idsu.getEnergy(), (int) idsu.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue