diff options
| author | Pilad <piladt@gmail.com> | 2024-05-10 14:53:11 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-10 11:53:11 +0200 |
| commit | 0099a7df8f9738ad2fd487f5fee9aafa23f90363 (patch) | |
| tree | 4f9a2e685467c700d4d1397a8960de698dbd0c03 /src/main/java/gtPlusPlus/core | |
| parent | 284b9335b368090a4815aeb3530a846ffb9258bc (diff) | |
| download | GT5-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?
Diffstat (limited to 'src/main/java/gtPlusPlus/core')
| -rw-r--r-- | src/main/java/gtPlusPlus/core/common/CommonProxy.java | 3 | ||||
| -rw-r--r-- | src/main/java/gtPlusPlus/core/util/player/PlayerCache.java | 66 |
2 files changed, 0 insertions, 69 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; - } - -} |
