From 9285806d9e089b183caf9985718cee115ec75396 Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Tue, 31 Jan 2023 02:23:25 +0800 Subject: add back turbine wallsharing (#1699) * add back turbine wallsharing Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * use new texture from @Jimbno Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * remove unnecessary structure checks it turns out you cannot build 2 functional large turbine at these locations anyway, so why not? Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * spotless Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * update bs * use the original grey for empty texture these are slightly darker, and looks better Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> --------- Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> Co-authored-by: Martin Robertz --- src/main/java/gregtech/api/enums/Textures.java | 80 +++++++++++++++++++--- .../java/gregtech/api/util/LightingHelper.java | 27 ++++++++ 2 files changed, 97 insertions(+), 10 deletions(-) (limited to 'src/main/java/gregtech/api') diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index dd389cfdf7..569e535e8c 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -860,7 +860,6 @@ public class Textures { LARGETURBINE_ST6, LARGETURBINE_ST7, LARGETURBINE_ST8, - LARGETURBINE_ST9, LARGETURBINE_ST_ACTIVE1, LARGETURBINE_ST_ACTIVE2, @@ -869,9 +868,9 @@ public class Textures { LARGETURBINE_ST_ACTIVE5, LARGETURBINE_ST_ACTIVE6, LARGETURBINE_ST_ACTIVE7, - LARGETURBINE_ST_ACTIVE8, LARGETURBINE_ST_ACTIVE9, + LARGETURBINE_SS1, LARGETURBINE_SS2, LARGETURBINE_SS3, @@ -880,7 +879,6 @@ public class Textures { LARGETURBINE_SS6, LARGETURBINE_SS7, LARGETURBINE_SS8, - LARGETURBINE_SS9, LARGETURBINE_SS_ACTIVE1, LARGETURBINE_SS_ACTIVE2, @@ -889,9 +887,9 @@ public class Textures { LARGETURBINE_SS_ACTIVE5, LARGETURBINE_SS_ACTIVE6, LARGETURBINE_SS_ACTIVE7, - LARGETURBINE_SS_ACTIVE8, LARGETURBINE_SS_ACTIVE9, + LARGETURBINE_TI1, LARGETURBINE_TI2, LARGETURBINE_TI3, @@ -899,7 +897,6 @@ public class Textures { LARGETURBINE_TI5, LARGETURBINE_TI6, LARGETURBINE_TI7, - LARGETURBINE_TI8, LARGETURBINE_TI9, LARGETURBINE_TI_ACTIVE1, @@ -908,17 +905,16 @@ public class Textures { LARGETURBINE_TI_ACTIVE4, LARGETURBINE_TI_ACTIVE5, LARGETURBINE_TI_ACTIVE6, - LARGETURBINE_TI_ACTIVE7, LARGETURBINE_TI_ACTIVE8, LARGETURBINE_TI_ACTIVE9, + LARGETURBINE_TU1, LARGETURBINE_TU2, LARGETURBINE_TU3, LARGETURBINE_TU4, LARGETURBINE_TU5, LARGETURBINE_TU6, - LARGETURBINE_TU7, LARGETURBINE_TU8, LARGETURBINE_TU9, @@ -927,11 +923,11 @@ public class Textures { LARGETURBINE_TU_ACTIVE3, LARGETURBINE_TU_ACTIVE4, LARGETURBINE_TU_ACTIVE5, - LARGETURBINE_TU_ACTIVE6, LARGETURBINE_TU_ACTIVE7, LARGETURBINE_TU_ACTIVE8, LARGETURBINE_TU_ACTIVE9, + MACHINE_CASING_TURBINE, MACHINE_CASING_ADVANCEDGAS, BLOCK_ADAMANTIUM, @@ -1316,8 +1312,36 @@ public class Textures { MACHINE_CASING_PCB_TIER_1, MACHINE_CASING_PCB_TIER_2, MACHINE_CASING_PCB_TIER_3, - INFINITY_COOLED_CASING; - + INFINITY_COOLED_CASING, + + LARGETURBINE_NEW1, + LARGETURBINE_NEW2, + LARGETURBINE_NEW3, + LARGETURBINE_NEW4, + LARGETURBINE_NEW5, + LARGETURBINE_NEW6, + LARGETURBINE_NEW7, + LARGETURBINE_NEW8, + LARGETURBINE_NEW9, + LARGETURBINE_NEW_ACTIVE1, + LARGETURBINE_NEW_ACTIVE2, + LARGETURBINE_NEW_ACTIVE3, + LARGETURBINE_NEW_ACTIVE4, + LARGETURBINE_NEW_ACTIVE5, + LARGETURBINE_NEW_ACTIVE6, + LARGETURBINE_NEW_ACTIVE7, + LARGETURBINE_NEW_ACTIVE8, + LARGETURBINE_NEW_ACTIVE9, + LARGETURBINE_NEW_EMPTY1, + LARGETURBINE_NEW_EMPTY2, + LARGETURBINE_NEW_EMPTY3, + LARGETURBINE_NEW_EMPTY4, + LARGETURBINE_NEW_EMPTY5, + LARGETURBINE_NEW_EMPTY6, + LARGETURBINE_NEW_EMPTY7, + LARGETURBINE_NEW_EMPTY8, + LARGETURBINE_NEW_EMPTY9, + ; /** * Icon for Fresh CFoam */ @@ -1498,6 +1522,42 @@ public class Textures { LARGETURBINE_ST_EMPTY8, LARGETURBINE_ST_EMPTY9 }, + TURBINE_NEW = + { + LARGETURBINE_NEW1, + LARGETURBINE_NEW2, + LARGETURBINE_NEW3, + LARGETURBINE_NEW4, + LARGETURBINE_NEW5, + LARGETURBINE_NEW6, + LARGETURBINE_NEW7, + LARGETURBINE_NEW8, + LARGETURBINE_NEW9 + }, + TURBINE_NEW_ACTIVE = + { + LARGETURBINE_NEW_ACTIVE1, + LARGETURBINE_NEW_ACTIVE2, + LARGETURBINE_NEW_ACTIVE3, + LARGETURBINE_NEW_ACTIVE4, + LARGETURBINE_NEW_ACTIVE5, + LARGETURBINE_NEW_ACTIVE6, + LARGETURBINE_NEW_ACTIVE7, + LARGETURBINE_NEW_ACTIVE8, + LARGETURBINE_NEW_ACTIVE9 + }, + TURBINE_NEW_EMPTY = + { + LARGETURBINE_NEW_EMPTY1, + LARGETURBINE_NEW_EMPTY2, + LARGETURBINE_NEW_EMPTY3, + LARGETURBINE_NEW_EMPTY4, + LARGETURBINE_NEW_EMPTY5, + LARGETURBINE_NEW_EMPTY6, + LARGETURBINE_NEW_EMPTY7, + LARGETURBINE_NEW_EMPTY8, + LARGETURBINE_NEW_EMPTY9 + }, TURBINE1 = { LARGETURBINE_SS1, diff --git a/src/main/java/gregtech/api/util/LightingHelper.java b/src/main/java/gregtech/api/util/LightingHelper.java index 7bffbfd00d..5aa9000bf2 100644 --- a/src/main/java/gregtech/api/util/LightingHelper.java +++ b/src/main/java/gregtech/api/util/LightingHelper.java @@ -312,6 +312,33 @@ public class LightingHelper { return ao1 > ao2 ? ao1 - diff : ao1 + diff; } + /** + * @see #setupLightingXNeg(Block, int, int, int) + * @see #setupLightingYNeg(Block, int, int, int) + * @see #setupLightingZNeg(Block, int, int, int) + * @see #setupLightingXPos(Block, int, int, int) + * @see #setupLightingYPos(Block, int, int, int) + * @see #setupLightingZPos(Block, int, int, int) + */ + public LightingHelper setupLighting(Block block, int x, int y, int z, byte facing) { + switch (facing) { + case 0: + return setupLightingYNeg(block, x, y, z); + case 1: + return setupLightingYPos(block, x, y, z); + case 2: + return setupLightingZNeg(block, x, y, z); + case 3: + return setupLightingZPos(block, x, y, z); + case 4: + return setupLightingXNeg(block, x, y, z); + case 5: + return setupLightingXPos(block, x, y, z); + default: + throw new IllegalArgumentException("Unknown side: " + facing); + } + } + /** * Sets up lighting for the West face and returns the {@link LightingHelper}. *

-- cgit