From ff11a4688a32e5d9929286db23dacc9fc489c5f0 Mon Sep 17 00:00:00 2001 From: Hilligans Date: Wed, 20 Dec 2023 10:12:24 -0600 Subject: [PATCH] Old event cleanup and removal --- .../dev/hilligans/ourcraft/client/Client.java | 3 --- .../ourcraft/client/input/key/KeyHandler.java | 5 ----- .../graphics/api/IGraphicsEngine.java | 4 ---- .../graphics/opengl/OpenGLEngine.java | 4 ---- .../client/ClientStartRenderingEvent.java | 6 ------ .../handler/events/client/GLInitEvent.java | 13 ------------ .../events/client/RenderPostEvent.java | 13 ------------ .../handler/events/client/RenderPreEvent.java | 6 ------ .../events/client/RenderStartEvent.java | 20 ------------------- .../events/client/RenderWorldEvent.java | 19 ------------------ 10 files changed, 93 deletions(-) delete mode 100644 src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/ClientStartRenderingEvent.java delete mode 100644 src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/GLInitEvent.java delete mode 100644 src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderPostEvent.java delete mode 100644 src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderPreEvent.java delete mode 100644 src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderStartEvent.java delete mode 100644 src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderWorldEvent.java diff --git a/src/main/java/dev/hilligans/ourcraft/client/Client.java b/src/main/java/dev/hilligans/ourcraft/client/Client.java index 6d2b51a4..79a7970c 100644 --- a/src/main/java/dev/hilligans/ourcraft/client/Client.java +++ b/src/main/java/dev/hilligans/ourcraft/client/Client.java @@ -16,13 +16,11 @@ import dev.hilligans.ourcraft.client.rendering.ScreenBuilder; import dev.hilligans.ourcraft.client.rendering.screens.container.screens.CreativeInventoryScreen; import dev.hilligans.ourcraft.client.rendering.screens.container.screens.InventoryScreen; -import dev.hilligans.ourcraft.client.rendering.world.managers.ShaderManager; import dev.hilligans.ourcraft.ClientMain; import dev.hilligans.ourcraft.container.Container; import dev.hilligans.ourcraft.data.other.PlayerList; import dev.hilligans.ourcraft.GameInstance; import dev.hilligans.ourcraft.item.ItemStack; -import dev.hilligans.ourcraft.mod.handler.events.client.ClientStartRenderingEvent; import dev.hilligans.ourcraft.mod.handler.events.client.OpenScreenEvent; import dev.hilligans.ourcraft.network.ClientNetwork; import dev.hilligans.ourcraft.network.IClientPacketHandler; @@ -148,7 +146,6 @@ public void startClient() { // splitWindow.setRenderPipeline("ourcraft:split_window_pipeline"); // splitWindow.addWindow(subWindow); - gameInstance.EVENT_BUS.postEvent(new ClientStartRenderingEvent()); rWindow = window; System.err.println("Time to start running: " + (System.currentTimeMillis() - ClientMain.startTime)); graphicsEngine.createRenderLoop(gameInstance, window).run(); diff --git a/src/main/java/dev/hilligans/ourcraft/client/input/key/KeyHandler.java b/src/main/java/dev/hilligans/ourcraft/client/input/key/KeyHandler.java index d34eb1f4..15f7c0ed 100644 --- a/src/main/java/dev/hilligans/ourcraft/client/input/key/KeyHandler.java +++ b/src/main/java/dev/hilligans/ourcraft/client/input/key/KeyHandler.java @@ -2,7 +2,6 @@ import dev.hilligans.ourcraft.ClientMain; import dev.hilligans.ourcraft.data.primitives.Tuple; -import dev.hilligans.ourcraft.mod.handler.events.client.GLInitEvent; import it.unimi.dsi.fastutil.ints.Int2CharOpenHashMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import org.lwjgl.glfw.GLFW; @@ -119,10 +118,6 @@ public void invoke(long window, int key, int scancode, int action, int mods) { }); } - private static void setCallback(GLInitEvent glInitEvent) { - setCallback(glInitEvent.window); - } - private static void putKeyAndKey(int id, char key) { mappedKeys.put(id,key); namedKeys.put(id,key + ""); diff --git a/src/main/java/dev/hilligans/ourcraft/client/rendering/graphics/api/IGraphicsEngine.java b/src/main/java/dev/hilligans/ourcraft/client/rendering/graphics/api/IGraphicsEngine.java index 2120916d..79ad6574 100644 --- a/src/main/java/dev/hilligans/ourcraft/client/rendering/graphics/api/IGraphicsEngine.java +++ b/src/main/java/dev/hilligans/ourcraft/client/rendering/graphics/api/IGraphicsEngine.java @@ -3,12 +3,8 @@ import dev.hilligans.ourcraft.client.MatrixStack; import dev.hilligans.ourcraft.client.rendering.graphics.GraphicsData; import dev.hilligans.ourcraft.client.rendering.graphics.RenderWindow; -import dev.hilligans.ourcraft.client.rendering.graphics.opengl.OpenGLEngine; -import dev.hilligans.ourcraft.client.rendering.graphics.opengl.OpenglDefaultImpl; import dev.hilligans.ourcraft.client.rendering.world.StringRenderer; import dev.hilligans.ourcraft.GameInstance; -import dev.hilligans.ourcraft.mod.handler.events.client.RenderPostEvent; -import dev.hilligans.ourcraft.mod.handler.events.client.RenderPreEvent; import dev.hilligans.ourcraft.util.Logger; import dev.hilligans.ourcraft.util.registry.IRegistryElement; import dev.hilligans.ourcraft.util.sections.ISection; diff --git a/src/main/java/dev/hilligans/ourcraft/client/rendering/graphics/opengl/OpenGLEngine.java b/src/main/java/dev/hilligans/ourcraft/client/rendering/graphics/opengl/OpenGLEngine.java index f83b1961..ff128357 100644 --- a/src/main/java/dev/hilligans/ourcraft/client/rendering/graphics/opengl/OpenGLEngine.java +++ b/src/main/java/dev/hilligans/ourcraft/client/rendering/graphics/opengl/OpenGLEngine.java @@ -5,11 +5,8 @@ import dev.hilligans.ourcraft.client.rendering.graphics.RenderWindow; import dev.hilligans.ourcraft.client.rendering.graphics.api.GraphicsContext; import dev.hilligans.ourcraft.client.rendering.graphics.api.GraphicsEngineBase; -import dev.hilligans.ourcraft.client.rendering.newrenderer.GLRenderer; import dev.hilligans.ourcraft.client.rendering.screens.JoinScreen; -import dev.hilligans.ourcraft.client.rendering.world.managers.ShaderManager; import dev.hilligans.ourcraft.data.primitives.Tuple; -import dev.hilligans.ourcraft.mod.handler.events.client.GLInitEvent; import dev.hilligans.ourcraft.util.Logger; import dev.hilligans.ourcraft.util.sections.ProfiledSection; import org.lwjgl.opengl.GL; @@ -89,7 +86,6 @@ public OpenGLWindow setup() { GL.createCapabilities(); client.glStarted = true; - client.gameInstance.EVENT_BUS.postEvent(new GLInitEvent(window)); gameInstance.build(this, null); setupStringRenderer(""); diff --git a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/ClientStartRenderingEvent.java b/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/ClientStartRenderingEvent.java deleted file mode 100644 index 33ca40fc..00000000 --- a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/ClientStartRenderingEvent.java +++ /dev/null @@ -1,6 +0,0 @@ -package dev.hilligans.ourcraft.mod.handler.events.client; - -import dev.hilligans.ourcraft.mod.handler.Event; - -public class ClientStartRenderingEvent extends Event { -} diff --git a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/GLInitEvent.java b/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/GLInitEvent.java deleted file mode 100644 index 6a740d33..00000000 --- a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/GLInitEvent.java +++ /dev/null @@ -1,13 +0,0 @@ -package dev.hilligans.ourcraft.mod.handler.events.client; - -import dev.hilligans.ourcraft.mod.handler.Event; - -public class GLInitEvent extends Event { - - public long window; - - public GLInitEvent(long window) { - this.window = window; - } - -} diff --git a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderPostEvent.java b/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderPostEvent.java deleted file mode 100644 index 7c7d3fe8..00000000 --- a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderPostEvent.java +++ /dev/null @@ -1,13 +0,0 @@ -package dev.hilligans.ourcraft.mod.handler.events.client; - -import dev.hilligans.ourcraft.client.Client; -import dev.hilligans.ourcraft.mod.handler.Event; - -public class RenderPostEvent extends Event { - public Client client; - - public RenderPostEvent(Client client) { - this.client = client; - } - -} diff --git a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderPreEvent.java b/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderPreEvent.java deleted file mode 100644 index 89be5fcf..00000000 --- a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderPreEvent.java +++ /dev/null @@ -1,6 +0,0 @@ -package dev.hilligans.ourcraft.mod.handler.events.client; - -import dev.hilligans.ourcraft.mod.handler.Event; - -public class RenderPreEvent extends Event { -} diff --git a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderStartEvent.java b/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderStartEvent.java deleted file mode 100644 index 284f148f..00000000 --- a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderStartEvent.java +++ /dev/null @@ -1,20 +0,0 @@ -package dev.hilligans.ourcraft.mod.handler.events.client; - -import dev.hilligans.ourcraft.client.Client; -import dev.hilligans.ourcraft.client.MatrixStack; -import dev.hilligans.ourcraft.mod.handler.Event; - -public class RenderStartEvent extends Event { - - public MatrixStack worldStack; - public MatrixStack screenStack; - public Client client; - - public RenderStartEvent(MatrixStack worldStack, MatrixStack screenStack, Client client) { - this.worldStack = worldStack; - this.screenStack = screenStack; - this.client = client; - } - - -} diff --git a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderWorldEvent.java b/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderWorldEvent.java deleted file mode 100644 index f33500ce..00000000 --- a/src/main/java/dev/hilligans/ourcraft/mod/handler/events/client/RenderWorldEvent.java +++ /dev/null @@ -1,19 +0,0 @@ -package dev.hilligans.ourcraft.mod.handler.events.client; - -import dev.hilligans.ourcraft.client.Client; -import dev.hilligans.ourcraft.client.MatrixStack; -import dev.hilligans.ourcraft.mod.handler.Event; - -public class RenderWorldEvent extends Event { - - public MatrixStack worldStack; - public MatrixStack screenStack; - public Client client; - - public RenderWorldEvent(MatrixStack worldStack, MatrixStack screenStack, Client client) { - this.worldStack = worldStack; - this.screenStack = screenStack; - this.client = client; - } - -}