Enhance GUI elements and register upgrade cards (#120)

This commit is contained in:
Ranzu authored and GitHub committed 2026-04-03 15:17:38 +02:00
1 parent 1e0f7d04d0
commit 29d05c3532
7 files changed
+25 -10

No files matched your search

@@ -11,6 +11,7 @@ import net.minecraft.world.World;
import org.apache.commons.lang3.StringUtils;
import org.lwjgl.opengl.GL11;
import appeng.core.localization.GuiColors;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumcraft.api.aspects.Aspect;
@@ -211,7 +212,11 @@ public class GuiArcaneAssembler extends ThEBaseGui {
@Override
public void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
// Draw the title
this.fontRendererObj.drawString(this.title, GuiArcaneAssembler.TITLE_POS_X, GuiArcaneAssembler.TITLE_POS_Y, 0);
this.fontRendererObj.drawString(
this.title,
GuiArcaneAssembler.TITLE_POS_X,
GuiArcaneAssembler.TITLE_POS_Y,
GuiColors.UpgradableTitle.getColor());
// Is the mouse over any of the bars?
for (Aspect aspect : TileArcaneAssembler.PRIMALS) {
@@ -25,7 +25,7 @@ import thaumicenergistics.common.utils.ThEUtils;
public class GuiArcaneCraftingTerminal extends GuiMEMonitorable {
private static final int GUI_WIDTH = 230;
private static final int GUI_HEIGHT = 243;
private static final int GUI_HEIGHT = 244;
private static final int GUI_VIEW_CELL_TEXTURE_WIDTH = 35;
private static final int GUI_MAIN_BODY_WIDTH = GUI_WIDTH - GUI_VIEW_CELL_TEXTURE_WIDTH;
private static final int GUI_UPPER_TEXTURE_HEIGHT = 17 + 18 * 3;
@@ -96,7 +96,7 @@ public class GuiArcaneCraftingTerminal extends GuiMEMonitorable {
GUI_TEXTURE_LOWER_HEIGHT);
// draw view cells background
this.drawTexturedModalRect(offsetX + x_width, offsetY, x_width, 0, 32, 104);
this.drawTexturedModalRect(offsetX + x_width, offsetY, x_width, 0, GUI_VIEW_CELL_TEXTURE_WIDTH, 104);
this.searchField.drawTextBox();
@@ -15,6 +15,7 @@ import org.lwjgl.opengl.GL11;
import appeng.api.storage.data.IAEStackType;
import appeng.client.gui.AEBaseGui;
import appeng.client.gui.slots.VirtualMEPhantomSlot;
import appeng.core.localization.GuiColors;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumcraft.api.aspects.Aspect;
@@ -135,7 +136,7 @@ public class GuiDistillationPatternEncoder extends AEBaseGui {
this.title,
GuiDistillationPatternEncoder.TITLE_POS_X,
GuiDistillationPatternEncoder.TITLE_POS_Y,
0);
GuiColors.PatternTerminalTitle.getColor());
// Check the source item
if (this.sourceItemDirty) {
@@ -8,6 +8,7 @@ import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import appeng.core.localization.GuiColors;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumicenergistics.client.gui.abstraction.ThEBaseGui;
@@ -214,8 +215,11 @@ public class GuiKnowledgeInscriber extends ThEBaseGui {
@Override
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
// Draw the title
this.fontRendererObj
.drawString(this.title, GuiKnowledgeInscriber.TITLE_POS_X, GuiKnowledgeInscriber.TITLE_POS_Y, 0);
this.fontRendererObj.drawString(
this.title,
GuiKnowledgeInscriber.TITLE_POS_X,
GuiKnowledgeInscriber.TITLE_POS_Y,
GuiColors.InscriberTitle.getColor());
// Any particles to draw?
if (this.hasParticlesToDraw) {
@@ -42,13 +42,13 @@ public class GuiButtonSaveDelete extends ThEStateButton {
switch (saveState) {
case Disabled_InvalidRecipe:
this.enabled = false;
this.stateIcon = null;
this.stateIcon = AEStateIconsEnum.INVALID_RECIPE;
this.cachedTooltip = ThEStrings.TooltipButton_InscriberInvalid.getLocalized();
break;
case Disabled_CoreFull:
this.enabled = false;
this.stateIcon = null;
this.stateIcon = AEStateIconsEnum.CORE_FULL;;
this.cachedTooltip = ThEStrings.TooltipButton_InscriberFull.getLocalized();
break;
@@ -66,7 +66,7 @@ public class GuiButtonSaveDelete extends ThEStateButton {
case Disabled_MissingCore:
this.enabled = false;
this.stateIcon = null;
this.stateIcon = AEStateIconsEnum.MISSING_CORE;
this.cachedTooltip = ThEStrings.TooltipButton_InscriberMissing.getLocalized();
break;
}
@@ -58,6 +58,9 @@ public enum AEStateIconsEnum implements IStateIconTexture {
ENABLED(16, 128),
SAVE(0, 176),
DELETE(0, 192),
INVALID_RECIPE(112, 96),
MISSING_CORE(0, 128),
CORE_FULL(80, 96),
CLEAR_GRID(96, 0),
ARROW_DOWN(128, 0),
@@ -32,7 +32,9 @@ public enum AEPartsEnum {
EssentiaLevelEmitter(ThEStrings.Part_EssentiaLevelEmitter, PartEssentiaLevelEmitter.class, true),
EssentiaStorageBus(ThEStrings.Part_EssentiaStorageBus, PartEssentiaStorageBus.class, null,
generatePair(Upgrades.INVERTER, 1)),
generatePair(Upgrades.INVERTER, 1), generatePair(Upgrades.CAPACITY, 1), generatePair(Upgrades.STICKY, 1)
),
EssentiaExportBus(ThEStrings.Part_EssentiaExportBus, PartEssentiaExportBus.class,
ThaumicEnergistics.MOD_ID + ".group.essentia.transport", generatePair(Upgrades.CAPACITY, 2),