Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Glease <[email protected]>
  • Loading branch information
Glease committed Apr 25, 2024
1 parent 69c4be6 commit 2ebc05b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
14 changes: 11 additions & 3 deletions src/main/java/com/gtnewhorizon/structurelib/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.lang.ref.WeakReference;
import java.util.*;

import cpw.mods.fml.client.config.GuiConfig;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
Expand Down Expand Up @@ -38,6 +37,7 @@
import com.gtnewhorizon.structurelib.net.RegistryOrderSyncMessage;
import com.gtnewhorizon.structurelib.net.SetChannelDataMessage;

import cpw.mods.fml.client.config.GuiConfig;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
Expand Down Expand Up @@ -287,8 +287,16 @@ public UUID getSPPlayerUUID() {
}

public void displayConfigGUI(String category) {
ConfigElement<Object> element = new ConfigElement<>(ConfigurationHandler.INSTANCE.getConfig().getCategory(category));
GuiConfig guiConfig = new GuiConfig(null, element.getChildElements(), StructureLibAPI.MOD_ID, null, false, false, I18n.format(element.getLanguageKey()));
ConfigElement<Object> element = new ConfigElement<>(
ConfigurationHandler.INSTANCE.getConfig().getCategory(category));
GuiConfig guiConfig = new GuiConfig(
null,
element.getChildElements(),
StructureLibAPI.MOD_ID,
null,
false,
false,
I18n.format(element.getLanguageKey()));
Minecraft.getMinecraft().displayGuiScreen(guiConfig);
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/gtnewhorizon/structurelib/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ protected static void addThrottledChat(Object throttleKey, EntityPlayer player,
}
}

public void displayConfigGUI(String category) {
}
public void displayConfigGUI(String category) {}

public static class ForgeEventHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ public Pair<List<String>, List<String>> getRegistryOrder(String name) {
return registryOrders.get(name);
}


Configuration getConfig() {
return config;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void initGui() {
this.orderEntries = new EntriesList(
(width - MID_SECTION_WIDTH) / 2 - LIST_WINDOW_PADDING,
(width + MID_SECTION_WIDTH) / 2,
I18n.format("structurelib.configgui.enabled"));
I18n.format("structurelib.configgui.enabled"));
this.orderEntries.initEntries(Arrays.asList(orderElement.getList()));
} else {
this.orderEntries
Expand Down Expand Up @@ -361,14 +361,18 @@ public EntriesList(int width, int left, String heading) {
public void drawScreen(int p_148128_1_, int p_148128_2_, float p_148128_3_) {
GL11.glEnable(GL11.GL_SCISSOR_TEST);
ScaledResolution scaledresolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
GL11.glScissor((left - 4) * scaledresolution.getScaleFactor(), (int) ((scaledresolution.getScaledHeight_double() - (bottom + 4)) * scaledresolution.getScaleFactor()), (width + 8) * scaledresolution.getScaleFactor(), (height + 8) * scaledresolution.getScaleFactor());
GL11.glScissor(
(left - 4) * scaledresolution.getScaleFactor(),
(int) ((scaledresolution.getScaledHeight_double() - (bottom + 4))
* scaledresolution.getScaleFactor()),
(width + 8) * scaledresolution.getScaleFactor(),
(height + 8) * scaledresolution.getScaleFactor());
super.drawScreen(p_148128_1_, p_148128_2_, p_148128_3_);
GL11.glDisable(GL11.GL_SCISSOR_TEST);
}

@Override
public void overlayBackground(int p_148136_1_, int p_148136_2_, int p_148136_3_, int p_148136_4_) {
}
public void overlayBackground(int p_148136_1_, int p_148136_2_, int p_148136_3_, int p_148136_4_) {}

@Override
protected void drawContainerBackground(Tessellator tessellator) {
Expand Down Expand Up @@ -397,7 +401,7 @@ protected void drawListHeader(int p_148129_1_, int p_148129_2_, Tessellator p_14
}
FontRenderer fr = mc.fontRenderer;
fr.drawString(
this.heading,
this.heading,
p_148129_1_ + this.width / 2 - fr.getStringWidth(this.heading) / 2,
Math.min(this.top + 3, p_148129_2_),
0xffffff);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public class SortedRegistry<V> implements Iterable<V> {
/**
* Construct an unsynchronized registry
*/
public SortedRegistry() {
}
public SortedRegistry() {}

/**
* Construct a synchronized registry whose ordering will be synced to the server
Expand Down

0 comments on commit 2ebc05b

Please sign in to comment.