From 946f20b8a026e637746f5c8e92d3bedafe8bd136 Mon Sep 17 00:00:00 2001 From: Reagan Roop Date: Sat, 1 Jun 2024 20:27:03 -0500 Subject: [PATCH] Add dimension checking for the visualizer --- .../ae2stuff/items/visualiser/VisualiserOverlayRender.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/scala/net/bdew/ae2stuff/items/visualiser/VisualiserOverlayRender.scala b/src/main/scala/net/bdew/ae2stuff/items/visualiser/VisualiserOverlayRender.scala index e84b347..ceaff5c 100644 --- a/src/main/scala/net/bdew/ae2stuff/items/visualiser/VisualiserOverlayRender.scala +++ b/src/main/scala/net/bdew/ae2stuff/items/visualiser/VisualiserOverlayRender.scala @@ -227,6 +227,12 @@ object VisualiserOverlayRender extends WorldOverlayRenderer { val stack = Client.player.inventory.getCurrentItem if (stack != null && stack.getItem == ItemVisualiser) { + // Do not render if in a different dimension from the bound network + val networkDim = stack.getTagCompound.getInteger("dim") + if (networkDim != Client.world.provider.dimensionId) { + return + } + val mode = ItemVisualiser.getMode(stack) GL11.glPushAttrib(GL11.GL_ENABLE_BIT)