aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPilad <piladt@gmail.com>2024-05-10 14:53:11 +0500
committerGitHub <noreply@github.com>2024-05-10 11:53:11 +0200
commit0099a7df8f9738ad2fd487f5fee9aafa23f90363 (patch)
tree4f9a2e685467c700d4d1397a8960de698dbd0c03
parent284b9335b368090a4815aeb3530a846ffb9258bc (diff)
downloadGT5-Unofficial-0099a7df8f9738ad2fd487f5fee9aafa23f90363.tar.gz
GT5-Unofficial-0099a7df8f9738ad2fd487f5fee9aafa23f90363.tar.bz2
GT5-Unofficial-0099a7df8f9738ad2fd487f5fee9aafa23f90363.zip
Fixed the controller texture for the turbines.PlayerCache is not called anywhere? (#878)
* Fixed the controller texture for the turbines. * The file is not called anywhere? This file doesn't seem to be used anywhere. Maybe it's worth removing?
-rw-r--r--src/main/java/gtPlusPlus/core/common/CommonProxy.java3
-rw-r--r--src/main/java/gtPlusPlus/core/util/player/PlayerCache.java66
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java5
7 files changed, 15 insertions, 79 deletions
diff --git a/src/main/java/gtPlusPlus/core/common/CommonProxy.java b/src/main/java/gtPlusPlus/core/common/CommonProxy.java
index ab7090351b..70062a5f00 100644
--- a/src/main/java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/main/java/gtPlusPlus/core/common/CommonProxy.java
@@ -36,7 +36,6 @@ import gtPlusPlus.core.tileentities.ModTileEntities;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.EntityUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.player.PlayerCache;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.preloader.CORE_Preloader;
import gtPlusPlus.xmod.gregtech.api.util.SpecialBehaviourTooltipHandler;
@@ -101,8 +100,6 @@ public class CommonProxy {
}
public void postInit(final FMLPostInitializationEvent e) {
- Logger.INFO("Cleaning up, doing postInit.");
- PlayerCache.initCache();
// Make Burnables burnable
if (!CORE.burnables.isEmpty()) {
diff --git a/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java b/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java
deleted file mode 100644
index a403756c77..0000000000
--- a/src/main/java/gtPlusPlus/core/util/player/PlayerCache.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package gtPlusPlus.core.util.player;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Properties;
-import java.util.UUID;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-
-public class PlayerCache {
-
- private static final File cache = new File("PlayerCache.dat");
-
- public static void initCache() {
- if (CORE.PlayerCache == null) {
- if (cache.exists()) {
- CORE.PlayerCache = PlayerCache.readPropertiesFileAsMap();
- Logger.INFO("Loaded PlayerCache.dat");
- }
- if (CORE.PlayerCache == null) {
- Logger.INFO("Failed to load PlayerCache.dat");
- PlayerCache.createPropertiesFile("PLAYER_", "DATA");
- }
- }
- }
-
- public static void createPropertiesFile(final String playerName, final String playerUUIDasString) {
- try {
- final Properties props = new Properties();
- props.setProperty(playerName + " ", playerUUIDasString);
- final OutputStream out = new FileOutputStream(cache);
- props.store(out, "Player Cache.");
- Logger.INFO("PlayerCache.dat created for future use.");
- out.close();
- } catch (final Exception e) {
- e.printStackTrace();
- }
- }
-
- public static HashMap<String, UUID> readPropertiesFileAsMap() {
- HashMap<String, UUID> map = null;
- try {
- final FileInputStream fis = new FileInputStream(cache);
- final ObjectInputStream ois = new ObjectInputStream(fis);
- map = (HashMap<String, UUID>) ois.readObject();
- ois.close();
- fis.close();
- } catch (final IOException ioe) {
- ioe.printStackTrace();
- return null;
- } catch (final ClassNotFoundException c) {
- Logger.INFO("Class not found");
- c.printStackTrace();
- return null;
- }
- Logger.WARNING("Deserialized PlayerCache..");
- return map;
- }
-
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java
index f2fd9a9a0a..c1491c7bf6 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java
@@ -25,6 +25,7 @@ import gregtech.api.recipe.check.SimpleCheckRecipeResult;
import gregtech.api.recipe.maps.FuelBackend;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@SuppressWarnings("deprecation")
public class GT_MTE_LargeTurbine_Gas extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -194,11 +195,11 @@ public class GT_MTE_LargeTurbine_Gas extends GregtechMetaTileEntity_LargerTurbin
@Override
protected ITexture getTextureFrontFace() {
- return new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_SS5);
+ return new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Controller_Advanced);
}
@Override
protected ITexture getTextureFrontFaceActive() {
- return new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5);
+ return new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java
index fb875dba3a..f6293920b5 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java
@@ -26,6 +26,7 @@ import gregtech.api.util.GT_Utility;
import gregtech.api.util.shutdown.ShutDownReasonRegistry;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@SuppressWarnings("deprecation")
public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -301,11 +302,11 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur
@Override
protected ITexture getTextureFrontFace() {
- return new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TU5);
+ return new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Controller_Advanced);
}
@Override
protected ITexture getTextureFrontFaceActive() {
- return new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TU_ACTIVE5);
+ return new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java
index 627717695b..7ee40757fd 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java
@@ -13,6 +13,7 @@ import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT_MTE_LargeTurbine_SCSteam extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -115,11 +116,11 @@ public class GT_MTE_LargeTurbine_SCSteam extends GregtechMetaTileEntity_LargerTu
@Override
protected ITexture getTextureFrontFace() {
- return TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI5);
+ return TextureFactory.of(TexturesGtBlock.Overlay_Machine_Controller_Advanced);
}
@Override
protected ITexture getTextureFrontFaceActive() {
- return TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5);
+ return TextureFactory.of(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java
index 7d36d35c77..dded1d04d9 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java
@@ -18,6 +18,7 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@SuppressWarnings("deprecation")
public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -188,11 +189,11 @@ public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTu
@Override
protected ITexture getTextureFrontFace() {
- return new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI5);
+ return new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Controller_Advanced);
}
@Override
protected ITexture getTextureFrontFaceActive() {
- return new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5);
+ return new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active);
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java
index 3173ef8f37..cb8bc06124 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java
@@ -19,6 +19,7 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@SuppressWarnings("deprecation")
public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurbineBase {
@@ -199,11 +200,11 @@ public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurb
@Override
protected ITexture getTextureFrontFace() {
- return new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_ST5);
+ return new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Controller_Advanced);
}
@Override
protected ITexture getTextureFrontFaceActive() {
- return new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_ST_ACTIVE5);
+ return new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active);
}
}