aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/enums
diff options
context:
space:
mode:
authorbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2020-12-24 18:46:40 +0100
committerbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2020-12-24 18:46:40 +0100
commiteacdf1e10f02be6f42957bbb065fec0345e3b64a (patch)
tree8d7cdac3688a1b76af46c043ef4261f523fb7e08 /src/main/java/gregtech/api/enums
parent768bc557bb7ce1df0b1b090fba46bcf106a2bd03 (diff)
downloadGT5-Unofficial-eacdf1e10f02be6f42957bbb065fec0345e3b64a.tar.gz
GT5-Unofficial-eacdf1e10f02be6f42957bbb065fec0345e3b64a.tar.bz2
GT5-Unofficial-eacdf1e10f02be6f42957bbb065fec0345e3b64a.zip
Heating Coil Logic Overhaul
Diffstat (limited to 'src/main/java/gregtech/api/enums')
-rw-r--r--src/main/java/gregtech/api/enums/HeatingCoilLevel.java64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/enums/HeatingCoilLevel.java b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java
new file mode 100644
index 0000000000..7b1b3f7334
--- /dev/null
+++ b/src/main/java/gregtech/api/enums/HeatingCoilLevel.java
@@ -0,0 +1,64 @@
+package gregtech.api.enums;
+
+public enum HeatingCoilLevel {
+ None ( 0L),
+ // ULV ( 901L), //Not implemented
+ LV ( 1_801L), //Cupronickel
+ MV ( 2_701L), //KANTHAL
+ HV ( 3_601L), //NICHROME
+ EV ( 4_501L), //TUNGSTENSTEEL
+ IV ( 5_401L), //HSSG
+ // LuV ( 6_301L), //Not implemented
+ ZPM ( 7_201L), //NAQUADAH
+ UV ( 9_001L), //NAQUADAHALLOY
+ UHV ( 9_901L), //ELECTRUMFLUX
+ UEV (10_801L), //AWAKENEDDRACONIUM
+ UIV (11_701L),
+
+ //Not Implemented yet
+ UMV (12_601L),
+ UXV (13_501L),
+ OpV (14_401L),
+ MAX (15_301L),
+ ;
+
+ private final long HEAT;
+
+ HeatingCoilLevel(long heat) {
+ this.HEAT = heat;
+ }
+ /**
+ * @return the coil heat, used for recipes in the Electronic Blast Furnace for example
+ */
+ public long getHeat() {
+ return HEAT;
+ }
+
+ /**
+ * @return the coil tier, used for discount in the Pyrolyse Ofen for example
+ */
+ public byte getTier() {
+ return (byte) (this.ordinal() - 1);
+ }
+
+ /**
+ * @return the coil Level, used for Parallels in the Multi Furnace for example
+ */
+ public byte getLevel() {
+ return (byte) Math.max(16, 2 << (this.ordinal() -1));
+ }
+
+ /**
+ * @return the coil Discount, used for discount in the Multi Furnace for example
+ */
+ public byte getCostDiscount() {
+ return (byte) Math.min(1, 2 << (this.ordinal() -1 -4)); //-1 bcs. of none, -4 = offset
+ }
+
+ public static HeatingCoilLevel getFromTier(byte tier){
+ if (tier < 0 || tier > HeatingCoilLevel.values().length -1)
+ return HeatingCoilLevel.None;
+
+ return HeatingCoilLevel.values()[tier+1];
+ }
+}