mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-23 13:30:04 +00:00
feat: Add new item LevelTerminal
This commit is contained in:
1 parent
c83f073319
commit
8098f04b45
31 files changed
+2987
-52
No files matched your search
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2. Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved. Applied
|
||||
* Energistics 2 is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version. Applied Energistics 2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
* Public License for more details. You should have received a copy of the GNU Lesser General Public License along with
|
||||
* Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
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