diff --git a/common/src/main/java/sh/okx/civmodern/common/gui/screen/CompactedConfigScreen.java b/common/src/main/java/sh/okx/civmodern/common/gui/screen/CompactedConfigScreen.java index cada57d..d274897 100644 --- a/common/src/main/java/sh/okx/civmodern/common/gui/screen/CompactedConfigScreen.java +++ b/common/src/main/java/sh/okx/civmodern/common/gui/screen/CompactedConfigScreen.java @@ -1,9 +1,5 @@ package sh.okx.civmodern.common.gui.screen; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; -import java.text.DecimalFormat; -import java.util.regex.Pattern; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; @@ -23,6 +19,9 @@ import sh.okx.civmodern.common.gui.widget.HsbColourPicker; import sh.okx.civmodern.common.gui.widget.ImageButton; +import java.text.DecimalFormat; +import java.util.regex.Pattern; + public class CompactedConfigScreen extends Screen { private static final DecimalFormat FORMAT = new DecimalFormat("##%"); @@ -102,8 +101,6 @@ protected void init() { @Override public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) { - super.renderBackground(guiGraphics, mouseX, mouseY, delta); - drawCentredText(guiGraphics, this.title, 0, 15, 0xffffff); drawItem(guiGraphics); diff --git a/common/src/main/java/sh/okx/civmodern/common/gui/screen/IceRoadConfigScreen.java b/common/src/main/java/sh/okx/civmodern/common/gui/screen/IceRoadConfigScreen.java index ef7d8f1..03c9829 100644 --- a/common/src/main/java/sh/okx/civmodern/common/gui/screen/IceRoadConfigScreen.java +++ b/common/src/main/java/sh/okx/civmodern/common/gui/screen/IceRoadConfigScreen.java @@ -47,7 +47,6 @@ protected void init() { @Override public void render(GuiGraphics guiGraphics, int i, int j, float f) { - super.renderBackground(guiGraphics, i, j, f); super.render(guiGraphics, i, j, f); guiGraphics.drawString(font, this.title, (int) (this.width / 2f - font.width(this.title) / 2f), 15, 0xffffff); diff --git a/common/src/main/java/sh/okx/civmodern/common/gui/screen/MainConfigScreen.java b/common/src/main/java/sh/okx/civmodern/common/gui/screen/MainConfigScreen.java index bc9d4f8..55a4a2d 100644 --- a/common/src/main/java/sh/okx/civmodern/common/gui/screen/MainConfigScreen.java +++ b/common/src/main/java/sh/okx/civmodern/common/gui/screen/MainConfigScreen.java @@ -1,6 +1,5 @@ package sh.okx.civmodern.common.gui.screen; -import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.screens.Screen; @@ -35,8 +34,6 @@ protected void init() { @Override public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) { - super.renderBackground(guiGraphics, mouseX, mouseY, delta); - guiGraphics.drawString(this.font, this.title, (int) (this.width / 2f - this.font.width(this.title) / 2f), 15, 0xffffff); super.render(guiGraphics, mouseX, mouseY, delta); } diff --git a/common/src/main/java/sh/okx/civmodern/common/gui/screen/RadarConfigScreen.java b/common/src/main/java/sh/okx/civmodern/common/gui/screen/RadarConfigScreen.java index 856cc91..58028fc 100644 --- a/common/src/main/java/sh/okx/civmodern/common/gui/screen/RadarConfigScreen.java +++ b/common/src/main/java/sh/okx/civmodern/common/gui/screen/RadarConfigScreen.java @@ -50,9 +50,9 @@ protected void init() { int offset = this.height / 6 - 18; ColourProvider colourProvider = mod.getColourProvider(); - bgPicker = addColourPicker(left, 220, CivMapConfig.DEFAULT_RADAR_BG_COLOUR, config::getRadarBgColour, config::setRadarBgColour, + bgPicker = addColourPicker(left, offset + 178, CivMapConfig.DEFAULT_RADAR_BG_COLOUR, config::getRadarBgColour, config::setRadarBgColour, colourProvider::setTemporaryRadarBackgroundColour); - fgPicker = addColourPicker(right, 220, CivMapConfig.DEFAULT_RADAR_FG_COLOUR, config::getRadarColour, config::setRadarColour, + fgPicker = addColourPicker(right, offset + 178, CivMapConfig.DEFAULT_RADAR_FG_COLOUR, config::getRadarColour, config::setRadarColour, colourProvider::setTemporaryRadarForegroundColour); addRenderableWidget(Button.builder(getRadarToggleMessage(), button -> { diff --git a/common/src/main/java/sh/okx/civmodern/common/radar/Radar.java b/common/src/main/java/sh/okx/civmodern/common/radar/Radar.java index 5276fa0..f62e3cd 100644 --- a/common/src/main/java/sh/okx/civmodern/common/radar/Radar.java +++ b/common/src/main/java/sh/okx/civmodern/common/radar/Radar.java @@ -19,9 +19,6 @@ import net.minecraft.client.player.LocalPlayer; import net.minecraft.client.player.RemotePlayer; import net.minecraft.client.renderer.GameRenderer; -import net.minecraft.client.renderer.LightTexture; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.block.model.BlockModel; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.client.resources.sounds.SimpleSoundInstance; @@ -33,14 +30,11 @@ import net.minecraft.network.chat.Style; import net.minecraft.resources.ResourceLocation; import net.minecraft.sounds.SoundEvent; -import net.minecraft.sounds.SoundEvents; -import net.minecraft.util.RandomSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.vehicle.Boat; import net.minecraft.world.entity.vehicle.Minecart; -import net.minecraft.world.inventory.InventoryMenu; import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; @@ -53,7 +47,11 @@ import sh.okx.civmodern.common.events.PostRenderGameOverlayEvent; import java.net.URL; -import java.util.*; +import java.util.Collections; +import java.util.HashSet; +import java.util.Random; +import java.util.Set; +import java.util.UUID; import static org.lwjgl.opengl.GL11.*; @@ -340,9 +338,9 @@ private void renderPlayers(GuiGraphics guiGraphics, float delta) { PlayerInfo entry = minecraft.player.connection.getPlayerInfo(player.getUUID()); guiGraphics.pose().scale(config.getIconSize(), config.getIconSize(), 0); if (config.isNorthUp()) { - guiGraphics.pose().mulPose(Axis.ZP.rotationDegrees(minecraft.player.getViewYRot(delta))); - } else { guiGraphics.pose().mulPose(Axis.ZP.rotationDegrees(180)); + } else { + guiGraphics.pose().mulPose(Axis.ZP.rotationDegrees(minecraft.player.getViewYRot(delta))); } ResourceLocation location; if (entry != null) {