Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit b86d624

Browse files
committed
clean up a few warnings
1 parent 268738f commit b86d624

File tree

171 files changed

+394
-1435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+394
-1435
lines changed

1.16_combat-6/src/main/java/io/github/axolotlclient/api/ChatsSidebar.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import io.github.axolotlclient.api.types.Channel;
3636
import io.github.axolotlclient.api.types.User;
3737
import io.github.axolotlclient.api.util.AlphabeticalComparator;
38+
import lombok.Getter;
3839
import net.minecraft.client.gui.AbstractParentElement;
3940
import net.minecraft.client.gui.Drawable;
4041
import net.minecraft.client.gui.Element;
@@ -50,6 +51,7 @@
5051
import net.minecraft.util.math.MathHelper;
5152
import org.lwjgl.glfw.GLFW;
5253

54+
@SuppressWarnings("deprecation")
5355
public class ChatsSidebar extends Screen implements ContextMenuScreen {
5456

5557
private static final int ANIM_STEP = 8;
@@ -182,6 +184,7 @@ public List<AbstractButtonWidget> getButtons() {
182184
}
183185

184186
private void close() {
187+
//noinspection DataFlowIssue
185188
client.openScreen(parent);
186189
if (chatWidget != null) {
187190
chatWidget.remove();
@@ -219,9 +222,11 @@ private void addChat(Channel channel) {
219222
int w;
220223
if (channel.isDM()) {
221224
User chatUser = ((Channel.DM) channel).getReceiver();
225+
//noinspection DataFlowIssue
222226
w = Math.max(client.textRenderer.getWidth(chatUser.getStatus().getTitle() + ": " + chatUser.getStatus().getDescription()) + 5,
223227
client.textRenderer.getWidth(channel.getName()));
224228
} else {
229+
//noinspection DataFlowIssue
225230
w = client.textRenderer.getWidth(channel.getName());
226231
}
227232
sidebarWidth = Math.min(Math.max(width * 5 / 12, w + 5), width / 2);
@@ -271,6 +276,7 @@ private class ListWidget extends AbstractParentElement implements Drawable, Elem
271276
private final int height;
272277
private final int entryHeight = 25;
273278
protected boolean hovered;
279+
@Getter
274280
private int x;
275281
private int scrollAmount;
276282
private boolean visible;
@@ -330,10 +336,6 @@ public boolean isMouseOver(double mouseX, double mouseY) {
330336
return hovered = visible && mouseX >= (double) this.x && mouseY >= (double) this.y && mouseX < (double) (this.x + this.width) && mouseY < (double) (this.y + this.height);
331337
}
332338

333-
public int getX() {
334-
return x;
335-
}
336-
337339
public void setX(int x) {
338340
this.x = x;
339341
elements.forEach(e -> e.x = x);

1.16_combat-6/src/main/java/io/github/axolotlclient/api/chat/ChatScreen.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import net.minecraft.client.gui.widget.ButtonWidget;
3434
import net.minecraft.client.gui.widget.TextFieldWidget;
3535
import net.minecraft.client.util.math.MatrixStack;
36+
import net.minecraft.text.LiteralText;
3637
import net.minecraft.text.TranslatableText;
3738
import org.lwjgl.glfw.GLFW;
3839

@@ -47,7 +48,7 @@ public class ChatScreen extends Screen implements ContextMenuScreen {
4748
private TextFieldWidget input;
4849

4950
public ChatScreen(Screen parent, Channel channel) {
50-
super(new TranslatableText("api.screen.chat"));
51+
super(new LiteralText(channel.getName()));
5152
this.channel = channel;
5253
this.parent = parent;
5354
}
@@ -82,6 +83,7 @@ protected void init() {
8283
users.setUsers(channel.getAllUsers(), channel);
8384
addChild(users);
8485

86+
//noinspection DataFlowIssue
8587
addButton(input = new TextFieldWidget(client.textRenderer, width / 2 - 150, height - 50,
8688
300, 20, new TranslatableText("api.chat.enterMessage")) {
8789

1.16_combat-6/src/main/java/io/github/axolotlclient/config/screen/ProfilesScreen.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ protected void init() {
6666
@Override
6767
public void onClose() {
6868
Profiles.getInstance().saveProfiles();
69+
//noinspection DataFlowIssue
6970
client.openScreen(parent);
7071
}
7172

1.16_combat-6/src/main/java/io/github/axolotlclient/mixin/ClientPlayerEntityMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public abstract class ClientPlayerEntityMixin {
3737
* @param sprintKey the sprint key that the user has bound
3838
* @return whether or not the user should try to sprint
3939
* @author DragonEggBedrockBreaking
40-
* @license MPL-2.0
40+
* <p>License: MPL-2.0</p>
4141
*/
4242
@Redirect(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/options/KeyBinding;isPressed()Z"))
4343
private boolean axolotlclient$alwaysPressed(KeyBinding sprintKey) {

1.16_combat-6/src/main/java/io/github/axolotlclient/mixin/WorldRendererMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* This implementation of custom skies is based on the FabricSkyBoxes mod by AMereBagatelle
4444
* <a href="https://github.com/AMereBagatelle/FabricSkyBoxes">Github Link.</a>
4545
*
46-
* @license MIT
46+
* <p>License: MIT</p>
4747
**/
4848

4949
@Mixin(WorldRenderer.class)

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/auth/AccountsListWidget.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
import com.mojang.blaze3d.platform.GlStateManager;
2828
import com.mojang.blaze3d.systems.RenderSystem;
29+
import lombok.Getter;
2930
import net.fabricmc.api.EnvType;
3031
import net.fabricmc.api.Environment;
3132
import net.minecraft.client.MinecraftClient;
@@ -69,6 +70,7 @@ public static class Entry extends AlwaysSelectedEntryListWidget.Entry<Entry> {
6970
private static final Identifier warningSign = new Identifier("axolotlclient", "textures/warning.png");
7071

7172
private final AccountsScreen screen;
73+
@Getter
7274
private final Account account;
7375
private final MinecraftClient client;
7476
private long time;
@@ -81,6 +83,7 @@ public Entry(AccountsScreen screen, Account account) {
8183

8284
@Override
8385
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
86+
//noinspection deprecation
8487
GlStateManager.color4f(1, 1, 1, 1);
8588
if (Auth.getInstance().getCurrent().equals(account)) {
8689
client.getTextureManager().bindTexture(checkmark);
@@ -113,8 +116,5 @@ public boolean mouseClicked(double mouseX, double mouseY, int button) {
113116
return false;
114117
}
115118

116-
public Account getAccount() {
117-
return account;
118-
}
119119
}
120120
}

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/blur/MotionBlur.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import io.github.axolotlclient.AxolotlClientConfig.impl.options.FloatOption;
3333
import io.github.axolotlclient.mixin.ShaderEffectAccessor;
3434
import io.github.axolotlclient.modules.AbstractModule;
35+
import lombok.Getter;
3536
import net.minecraft.client.MinecraftClient;
3637
import net.minecraft.client.gl.ShaderEffect;
3738
import net.minecraft.client.gl.Uniform;
@@ -43,6 +44,7 @@
4344

4445
public class MotionBlur extends AbstractModule {
4546

47+
@Getter
4648
private static final MotionBlur Instance = new MotionBlur();
4749
public final BooleanOption enabled = new BooleanOption("enabled", false);
4850
public final FloatOption strength = new FloatOption("strength", 50F, 1F, 99F);
@@ -60,10 +62,6 @@ private static float getBlur() {
6062
return MotionBlur.getInstance().strength.get() / 100F;
6163
}
6264

63-
public static MotionBlur getInstance() {
64-
return Instance;
65-
}
66-
6765
@Override
6866
public void init() {
6967
category.add(enabled, strength, inGuis);
@@ -140,7 +138,7 @@ public String getResourcePackName() {
140138
}
141139

142140
@Override
143-
public void close() throws IOException {
141+
public void close() {
144142

145143
}
146144
}

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/hud/HudEditScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* This implementation of Hud modules is based on KronHUD.
4747
* <a href="https://github.com/DarkKronicle/KronHUD">Github Link.</a>
4848
*
49-
* @license GPL-3.0
49+
* <p>License: GPL-3.0</p>
5050
*/
5151

5252
public class HudEditScreen extends Screen {

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/hud/HudManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* This implementation of Hud modules is based on KronHUD.
3737
* <a href="https://github.com/DarkKronicle/KronHUD">Github Link.</a>
3838
*
39-
* @license GPL-3.0
39+
* <p>License: GPL-3.0</p>
4040
*/
4141
public class HudManager extends HudManagerCommon {
4242
@Getter

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/hud/gui/hud/KeystrokeHud.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
* This implementation of Hud modules is based on KronHUD.
6969
* <a href="https://github.com/DarkKronicle/KronHUD">Github Link.</a>
7070
*
71-
* @license GPL-3.0
71+
* <p>License: GPL-3.0</p>
7272
*/
7373

7474
public class KeystrokeHud extends TextHudEntry implements ProfileAware {

0 commit comments

Comments
 (0)