mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-15 17:44:46 +00:00
Add LevelMaintainerTerminal rework logic inside TileLevelMaintainer (#162)
* Use new interface terminal API * Update dependencies.gradle * feat: Update core hooks and integrations * api: Add `LevelTerminalRegistry` functionality * feat: Use `customName` to display in `GuiFluidLevelEmitter` * feat: Rework scheduling and data storage in `TileLevelMaintainer` functionality * feat: Add new item `LevelTerminal` * feat: Support back navigation functionality * feat: add back navigation in `LevelMaintainer` from terminal * use `IGuiTooltipHandler` directly from ae2 include #160 * fix correct `InterfaceTerminalSupportedClassProvider` deprecation * Implement new version of `InterfaceWireless` based on `InterfaceTerminal` * Fix `LevelTerminal` data recursion and few in fixes gui * Use `aeRenderItem` directly and fix `zIndex` in custom slots * Fix rendering numbers bigger than 2.1G through `aeRenderItem` * Fix fails on `getCraftingItem` no root cause was found * Fix add packet logging and try to not fail after receive corrupted packet * Fix add logging around empty configuration * Fix packet corruption and log invalid data * Fix packet corruption with level emitters * Correct handle overwrite packet * Fix intercept dnd click from GT5 hook for `AppEngGuiHandler` keyword `net.bdew.neiaddons.appeng.AppEngGuiHandler` * update be+deps * Update dependencies.gradle * Update dependencies.gradle * Fix `zIndexes` for compatability with `DuraDisplay` * Update AE2 and fix compatability * Change `ForgeDirection` side serialization to `byte` * Fix tooltip zIndexes * Rename all rest parts related to `Level terminal` * Code cleanup after review * Remove duplicated dependency declaration --------- Co-authored-by: Firenoo <[email protected]> Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
80 files changed
+6169
-1785
No files matched your search
@@ -0,0 +1,46 @@
|
||||
package com.glodblock.github.util;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import appeng.core.AELog;
|
||||
|
||||
public enum FCGuiColors {
|
||||
|
||||
// ARGB Colors: Name and default value
|
||||
StateNone(0x00000000),
|
||||
StateIdle(0xFF55FF55),
|
||||
StateCraft(0xFFFFFF55),
|
||||
StateExport(0xFFAA00AA),
|
||||
StateError(0xFFFF5555);
|
||||
|
||||
private final String root;
|
||||
private final int color;
|
||||
|
||||
FCGuiColors() {
|
||||
this.root = "ae2fc.gui.color";
|
||||
this.color = 0x000000;
|
||||
}
|
||||
|
||||
FCGuiColors(final int hex) {
|
||||
this.root = "ae2fc.gui.color";
|
||||
this.color = hex;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
String hex = StatCollector.translateToLocal(this.getUnlocalized());
|
||||
int color = this.color;
|
||||
|
||||
if (hex.length() <= 8) {
|
||||
try {
|
||||
color = Integer.parseUnsignedInt(hex, 16);
|
||||
} catch (final NumberFormatException e) {
|
||||
AELog.warn("Couldn't format color correctly for: " + this.root + " -> " + hex);
|
||||
}
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
public String getUnlocalized() {
|
||||
return this.root + '.' + this.toString();
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ public class NameConst {
|
||||
public static final String ITEM_PART_FLUID_STORAGE_MONITOR = "part_fluid_storage_monitor";
|
||||
public static final String ITEM_PART_FLUID_CONVERSION_MONITOR = "part_fluid_conversion_monitor";
|
||||
public static final String ITEM_PART_FLUID_TERMINAL = "part_fluid_terminal";
|
||||
public static final String ITEM_PART_LEVEL_TERMINAL = "part_level_terminal";
|
||||
public static final String ITEM_PART_FLUID_PATTERN_TERMINAL = "part_fluid_pattern_terminal";
|
||||
public static final String ITEM_PART_FLUID_PATTERN_TERMINAL_EX = "part_fluid_pattern_terminal_ex";
|
||||
public static final String ITEM_PART_FLUID_INTERFACE = "part_fluid_interface";
|
||||
@@ -43,6 +44,7 @@ public class NameConst {
|
||||
public static final String ITEM_FLUID_PORTABLE_CELL = "portable_fluid_cell";
|
||||
public static final String ITEM_WIRELESS_FLUID_TERMINAL = "wireless_fluid_terminal";
|
||||
public static final String ITEM_WIRELESS_INTERFACE_TERMINAL = "wireless_interface_terminal";
|
||||
public static final String ITEM_WIRELESS_LEVEL_TERMINAL = "wireless_level_terminal";
|
||||
public static final String ITEM_WIRELESS_ULTRA_TERMINAL = "wireless_ultra_terminal";
|
||||
public static final String ITEM_WIRELESS_FLUID_PATTERN_TERMINAL = "wireless_fluid_pattern_terminal";
|
||||
public static final String ITEM_FLUID_PART = "fluid_part";
|
||||
@@ -50,6 +52,7 @@ public class NameConst {
|
||||
|
||||
public static final String TT_KEY = FluidCraft.MODID + ".tooltip.";
|
||||
public static final String TT_FLUID_TERMINAL = TT_KEY + "fluid_terminal";
|
||||
public static final String TT_LEVEL_TERMINAL = TT_KEY + "level_terminal";
|
||||
public static final String TT_INVALID_FLUID = TT_KEY + "invalid_fluid";
|
||||
public static final String TT_FLUID_PACKET = TT_KEY + "fluid_packet";
|
||||
public static final String TT_ENCODE_PATTERN = TT_KEY + "encode_pattern";
|
||||
@@ -79,6 +82,8 @@ public class NameConst {
|
||||
public static final String TT_LEVEL_MAINTAINER_LINK_DESC = TT_LEVEL_MAINTAINER + "link_desc";
|
||||
public static final String TT_LEVEL_MAINTAINER_EXPORT = TT_LEVEL_MAINTAINER + "export";
|
||||
public static final String TT_LEVEL_MAINTAINER_EXPORT_DESC = TT_LEVEL_MAINTAINER + "export_desc";
|
||||
public static final String TT_LEVEL_MAINTAINER_ERROR = TT_LEVEL_MAINTAINER + "error";
|
||||
public static final String TT_LEVEL_MAINTAINER_ERROR_DESC = TT_LEVEL_MAINTAINER + "error_desc";
|
||||
public static final String TT_CELL_CONTENTS = TT_KEY + "cell_contents";
|
||||
public static final String TT_CELL_EMPTY = TT_KEY + "cell_empty";
|
||||
public static final String TT_CELL_PORTABLE = TT_KEY + "cell_portable";
|
||||
@@ -101,6 +106,7 @@ public class NameConst {
|
||||
public static final String GUI_FLUID_PATTERN_TERMINAL = GUI_KEY + ITEM_PART_FLUID_PATTERN_TERMINAL;
|
||||
public static final String GUI_FLUID_PATTERN_TERMINAL_EX = GUI_KEY + ITEM_PART_FLUID_PATTERN_TERMINAL_EX;
|
||||
public static final String GUI_LEVEL_MAINTAINER = GUI_KEY + BLOCK_LEVEL_MAINTAINER;
|
||||
public static final String GUI_LEVEL_TERMINAL = GUI_KEY + ITEM_PART_LEVEL_TERMINAL;
|
||||
public static final String GUI_FLUID_PATTERN_ENCODER = GUI_KEY + BLOCK_FLUID_PATTERN_ENCODER;
|
||||
public static final String GUI_FLUID_PACKET_DECODER = GUI_KEY + BLOCK_FLUID_PACKET_DECODER;
|
||||
public static final String GUI_FLUID_AUTO_FILLER = GUI_KEY + BLOCK_FLUID_AUTO_FILLER;
|
||||
|
||||
Reference in new issue
Block a user