From 73faf78d215fb73bffc5310798e0293b69633114 Mon Sep 17 00:00:00 2001 From: austin Date: Thu, 15 May 2025 14:30:38 -0400 Subject: [PATCH] obliterate unused variables --- .../electrosphere/client/ClientState.java | 9 ++++++++ .../java/electrosphere/engine/Globals.java | 23 ------------------- .../engine/loadingthreads/ClientLoading.java | 16 ++++++------- .../engine/loadingthreads/LoadingUtils.java | 16 ++++++------- 4 files changed, 25 insertions(+), 39 deletions(-) diff --git a/src/main/java/electrosphere/client/ClientState.java b/src/main/java/electrosphere/client/ClientState.java index a00d8088..b4cbcd4d 100644 --- a/src/main/java/electrosphere/client/ClientState.java +++ b/src/main/java/electrosphere/client/ClientState.java @@ -1,5 +1,9 @@ package electrosphere.client; +import java.util.ArrayList; + +import org.joml.Vector3f; + import electrosphere.client.block.ClientBlockManager; import electrosphere.client.block.cells.ClientBlockCellManager; import electrosphere.client.chemistry.ClientChemistryCollisionCallback; @@ -167,6 +171,11 @@ public class ClientState { */ public Entity targetContainer = null; + //famous fuckin last words, but temporary solution + //global arraylist of values for the skybox colors + //edit(6/1/21): :upside_down_smile: + public ArrayList skyboxColors = new ArrayList(); + /** * Constructor */ diff --git a/src/main/java/electrosphere/engine/Globals.java b/src/main/java/electrosphere/engine/Globals.java index 6ceed847..4829339d 100644 --- a/src/main/java/electrosphere/engine/Globals.java +++ b/src/main/java/electrosphere/engine/Globals.java @@ -2,10 +2,7 @@ package electrosphere.engine; import java.lang.management.ManagementFactory; -import java.util.ArrayList; - import org.joml.Matrix4d; -import org.joml.Vector3f; import electrosphere.audio.AudioEngine; import electrosphere.audio.VirtualAudioSourceManager; @@ -18,7 +15,6 @@ import electrosphere.client.entity.particle.ParticleService; import electrosphere.client.fluid.cells.FluidCellManager; import electrosphere.client.terrain.cells.VoxelTextureAtlas; import electrosphere.client.ui.menu.WindowUtils; -import electrosphere.collision.CollisionWorldData; import electrosphere.controls.CameraHandler; import electrosphere.controls.ControlCallback; import electrosphere.controls.ControlHandler; @@ -30,7 +26,6 @@ import electrosphere.data.settings.UserSettings; import electrosphere.data.voxel.VoxelType; import electrosphere.engine.assetmanager.AssetDataStrings; import electrosphere.engine.assetmanager.AssetManager; -import electrosphere.engine.loadingthreads.InitialAssetLoading; import electrosphere.engine.os.fs.FileWatcherService; import electrosphere.engine.profiler.Profiler; import electrosphere.engine.signal.sync.MainThreadSignalService; @@ -40,8 +35,6 @@ import electrosphere.net.monitor.NetMonitor; import electrosphere.renderer.RenderUtils; import electrosphere.renderer.RenderingEngine; import electrosphere.renderer.actor.instance.InstanceManager; -import electrosphere.renderer.light.PointLight; -import electrosphere.renderer.light.SpotLight; import electrosphere.renderer.loading.ModelPretransforms; import electrosphere.renderer.meshgen.FluidChunkModelGeneration; import electrosphere.renderer.model.Material; @@ -235,9 +228,6 @@ public class Globals { public static String imagePlaneModelID; public static String solidPlaneModelID; - public static ArrayList lightPointListDefault; - public static SpotLight lightSpotDefault; - public static TextureMap textureMapDefault; public static ModelPretransforms modelPretransforms; @@ -283,14 +273,6 @@ public class Globals { //fluid cell manager public static FluidCellManager fluidCellManager; - - //famous fuckin last words, but temporary solution - //global arraylist of values for the skybox colors - //edit(6/1/21): :upside_down_smile: - public static ArrayList skyboxColors; - - //thread for loading different game states - public static InitialAssetLoading initialAssetLoadingThread = new InitialAssetLoading(); //manager for all widgets currently being drawn to screen public static ElementService elementService; @@ -300,9 +282,6 @@ public class Globals { public static FileWatcherService fileWatcherService; public static StructureScanningService structureScanningService; - //collision world data - public static CollisionWorldData commonWorldData; - // @@ -376,8 +355,6 @@ public class Globals { //load in shader options map shaderOptionMap = FileUtils.loadObjectFromAssetPath("Shaders/shaderoptions.json", ShaderOptionMap.class); shaderOptionMap.debug(); - //temporary hold for skybox colors - skyboxColors = new ArrayList(); //load asset manager assetManager = new AssetManager(); //game config diff --git a/src/main/java/electrosphere/engine/loadingthreads/ClientLoading.java b/src/main/java/electrosphere/engine/loadingthreads/ClientLoading.java index cbbf1079..cb4dc293 100644 --- a/src/main/java/electrosphere/engine/loadingthreads/ClientLoading.java +++ b/src/main/java/electrosphere/engine/loadingthreads/ClientLoading.java @@ -262,14 +262,14 @@ public class ClientLoading { float groundG = 20; float groundB = 20; - Globals.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); - Globals.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); - Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); - Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); - Globals.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); - Globals.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); - Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); - Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); + Globals.clientState.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); + Globals.clientState.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); + Globals.clientState.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); + Globals.clientState.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); + Globals.clientState.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); + Globals.clientState.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); + Globals.clientState.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); + Globals.clientState.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); //starry sky true skybox Entity skybox = EntityCreationUtils.createClientSpatialEntity(); diff --git a/src/main/java/electrosphere/engine/loadingthreads/LoadingUtils.java b/src/main/java/electrosphere/engine/loadingthreads/LoadingUtils.java index 880df14b..9d80e907 100644 --- a/src/main/java/electrosphere/engine/loadingthreads/LoadingUtils.java +++ b/src/main/java/electrosphere/engine/loadingthreads/LoadingUtils.java @@ -127,14 +127,14 @@ public class LoadingUtils { float groundG = 100; float groundB = 150; - Globals.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); - Globals.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); - Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); - Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); - Globals.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); - Globals.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); - Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); - Globals.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); + Globals.clientState.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); + Globals.clientState.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); + Globals.clientState.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); + Globals.clientState.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); + Globals.clientState.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); + Globals.clientState.skyboxColors.add(new Vector3f(skyR,skyG,skyB)); + Globals.clientState.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); + Globals.clientState.skyboxColors.add(new Vector3f(groundR,groundG,groundB)); }