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

Commit ccb7c70

Browse files
committed
reformat
1 parent 6d3b926 commit ccb7c70

File tree

259 files changed

+1450
-1401
lines changed

Some content is hidden

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

259 files changed

+1450
-1401
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private void addChat(Channel channel) {
224224
} else {
225225
w = client.textRenderer.getWidth(channel.getName());
226226
}
227-
sidebarWidth = Math.min(Math.max(width * 5 / 12, w + 5), width/2);
227+
sidebarWidth = Math.min(Math.max(width * 5 / 12, w + 5), width / 2);
228228
chatWidget = new ChatWidget(channel, 75, 50, sidebarWidth - 80, height - 100, this);
229229
addChild(chatWidget);
230230
addButton(input = new TextFieldWidget(textRenderer, 75, height - 30, sidebarWidth - 80, 20, new TranslatableText("api.friends.chat.input")) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public Builder entry(AbstractButtonWidget widget) {
158158
}
159159

160160
public Builder spacer() {
161-
elements.add(new ContextMenuEntry(new LiteralText("-----")){
161+
elements.add(new ContextMenuEntry(new LiteralText("-----")) {
162162
@Override
163163
protected MutableText getNarrationMessage() {
164164
return LiteralText.EMPTY.copy();

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public boolean keyPressed(int keyCode, int scanCode, int modifiers) {
123123
boolean bl2 = keyCode == 264;
124124
if (bl || bl2) {
125125
double d = this.scrollAmount();
126-
this.setScrollAmount(this.scrollAmount() + (double)(bl ? -1 : 1) * this.scrollRate());
126+
this.setScrollAmount(this.scrollAmount() + (double) (bl ? -1 : 1) * this.scrollRate());
127127
if (d != this.scrollAmount()) {
128128
return true;
129129
}
@@ -162,10 +162,10 @@ protected int totalInnerPadding() {
162162
public boolean isMouseOver(double mouseX, double mouseY) {
163163
return this.active
164164
&& this.visible
165-
&& mouseX >= (double)this.getX()
166-
&& mouseY >= (double)this.getY()
167-
&& mouseX < (double)(this.getXEnd() + 6)
168-
&& mouseY < (double)this.getYEnd();
165+
&& mouseX >= (double) this.getX()
166+
&& mouseY >= (double) this.getY()
167+
&& mouseX < (double) (this.getXEnd() + 6)
168+
&& mouseY < (double) this.getYEnd();
169169
}
170170

171171
@Override
@@ -185,11 +185,11 @@ protected void renderBackground(MatrixStack guiGraphics) {
185185
protected void renderBorder(MatrixStack guiGraphics, int x, int y, int width, int height) {
186186
int i = this.isFocused() ? -1 : -6250336;
187187
fill(guiGraphics, this.getX(), this.getY(), this.getXEnd(), this.getYEnd(), i);
188-
fill(guiGraphics, this.getX()+1, this.getY()+1, this.getXEnd()-1, this.getYEnd()-1, -16777216);
188+
fill(guiGraphics, this.getX() + 1, this.getY() + 1, this.getXEnd() - 1, this.getYEnd() - 1, -16777216);
189189
}
190190

191191
protected boolean withinContentAreaTopBottom(int top, int bottom) {
192-
return (double)bottom - this.scrollAmount() >= (double)this.getY() && (double)top - this.scrollAmount() <= (double)(this.getY() + this.height);
192+
return (double) bottom - this.scrollAmount() >= (double) this.getY() && (double) top - this.scrollAmount() <= (double) (this.getY() + this.height);
193193
}
194194

195195
protected abstract int getInnerHeight();
@@ -231,14 +231,14 @@ public boolean mouseScrolled(double mouseX, double mouseY, double scrollY) {
231231
@Override
232232
public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY) {
233233
if (this.scrolling) {
234-
if (mouseY < (double)this.getY()) {
234+
if (mouseY < (double) this.getY()) {
235235
this.setScrollAmount(0.0);
236-
} else if (mouseY > (double)this.getYEnd()) {
236+
} else if (mouseY > (double) this.getYEnd()) {
237237
this.setScrollAmount(this.maxScrollAmount());
238238
} else {
239239
double d = Math.max(1, this.maxScrollAmount());
240240
int i = this.scrollerHeight();
241-
double e = Math.max(1.0, d / (double)(this.height - i));
241+
double e = Math.max(1.0, d / (double) (this.height - i));
242242
this.setScrollAmount(this.scrollAmount() + dragY * e);
243243
}
244244

@@ -264,10 +264,10 @@ public void setScrollAmount(double scrollAmount) {
264264
public boolean updateScrolling(double mouseX, double mouseY, int button) {
265265
this.scrolling = this.scrollbarVisible()
266266
&& this.isValidClickButton(button)
267-
&& mouseX >= (double)this.scrollBarX()
268-
&& mouseX <= (double)(this.scrollBarX() + 6)
269-
&& mouseY >= (double)this.getY()
270-
&& mouseY < (double)this.getYEnd();
267+
&& mouseX >= (double) this.scrollBarX()
268+
&& mouseX <= (double) (this.scrollBarX() + 6)
269+
&& mouseY >= (double) this.getY()
270+
&& mouseY < (double) this.getYEnd();
271271
return this.scrolling;
272272
}
273273

@@ -284,30 +284,30 @@ protected boolean scrollbarVisible() {
284284
}
285285

286286
protected int scrollerHeight() {
287-
return MathHelper.clamp((int)((float)(this.height * this.height) / (float)this.contentHeight()), 32, this.height - 8);
287+
return MathHelper.clamp((int) ((float) (this.height * this.height) / (float) this.contentHeight()), 32, this.height - 8);
288288
}
289289

290290
protected int scrollBarX() {
291291
return this.getXEnd() - 6;
292292
}
293293

294294
protected int scrollBarY() {
295-
return Math.max(this.getY(), (int)this.scrollAmount * (this.height - this.scrollerHeight()) / this.maxScrollAmount() + this.getY());
295+
return Math.max(this.getY(), (int) this.scrollAmount * (this.height - this.scrollerHeight()) / this.maxScrollAmount() + this.getY());
296296
}
297297

298298
protected void renderScrollbar(MatrixStack guiGraphics) {
299299
if (this.scrollbarVisible()) {
300300
int i = this.scrollBarX();
301301
int j = this.scrollerHeight();
302302
int k = this.scrollBarY();
303-
fill(guiGraphics, i, getY(), i+SCROLLBAR_WIDTH, getYEnd(), -16777216);
304-
fill(guiGraphics, i, k, i+SCROLLBAR_WIDTH, k+j, -8355712);
305-
fill(guiGraphics, i, k, i+SCROLLBAR_WIDTH-1, k+j-1, -4144960);
303+
fill(guiGraphics, i, getY(), i + SCROLLBAR_WIDTH, getYEnd(), -16777216);
304+
fill(guiGraphics, i, k, i + SCROLLBAR_WIDTH, k + j, -8355712);
305+
fill(guiGraphics, i, k, i + SCROLLBAR_WIDTH - 1, k + j - 1, -4144960);
306306
}
307307
}
308308

309309
protected int getYEnd() {
310-
return getY()+getHeight();
310+
return getY() + getHeight();
311311
}
312312

313313
protected abstract int contentHeight();
@@ -323,7 +323,7 @@ protected int getY() {
323323
}
324324

325325
protected int getXEnd() {
326-
return getX()+getWidth();
326+
return getX() + getWidth();
327327
}
328328
}
329329
}

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

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -36,86 +36,86 @@
3636
import net.minecraft.text.TranslatableText;
3737

3838
public class ChannelInvitesScreen extends Screen {
39-
private final Screen parent;
40-
private ButtonWidget acceptButton;
41-
private ButtonWidget denyButton;
42-
private InvitesListWidget invites;
39+
private final Screen parent;
40+
private ButtonWidget acceptButton;
41+
private ButtonWidget denyButton;
42+
private InvitesListWidget invites;
4343

44-
public ChannelInvitesScreen(Screen parent) {
45-
super(new TranslatableText("api.channels.invites"));
46-
this.parent = parent;
47-
}
44+
public ChannelInvitesScreen(Screen parent) {
45+
super(new TranslatableText("api.channels.invites"));
46+
this.parent = parent;
47+
}
4848

49-
@Override
50-
protected void init() {
49+
@Override
50+
protected void init() {
5151

52-
addButton(new PlainTextButtonWidget(width / 2 - textRenderer.getWidth(title)/2, 33 / 2, 0, 0, title, w -> {
53-
}, textRenderer));
52+
addButton(new PlainTextButtonWidget(width / 2 - textRenderer.getWidth(title) / 2, 33 / 2, 0, 0, title, w -> {
53+
}, textRenderer));
5454

55-
invites = addChild(new InvitesListWidget(client, height, 33, width, height - 88, 25));
55+
invites = addChild(new InvitesListWidget(client, height, 33, width, height - 88, 25));
5656

5757

58-
acceptButton = addButton(new ButtonWidget(width / 2 - 75, height - 55 / 2 - 2 - 20, 73, 20, new TranslatableText("api.channels.invite.accept"), w -> {
59-
if (invites.getSelected() != null) {
58+
acceptButton = addButton(new ButtonWidget(width / 2 - 75, height - 55 / 2 - 2 - 20, 73, 20, new TranslatableText("api.channels.invite.accept"), w -> {
59+
if (invites.getSelected() != null) {
6060
w.active = false;
61-
ChannelRequest.acceptChannelInvite(invites.getSelected().invite).thenRun(() -> client.execute(() -> init(client, width, height)));
62-
}
63-
}));
64-
denyButton = addButton(new ButtonWidget(width / 2 + 2, height - 55 / 2 - 2 - 20, 73, 20, new TranslatableText("api.channels.invite.ignore"), w -> {
65-
if (invites.getSelected() != null) {
61+
ChannelRequest.acceptChannelInvite(invites.getSelected().invite).thenRun(() -> client.execute(() -> init(client, width, height)));
62+
}
63+
}));
64+
denyButton = addButton(new ButtonWidget(width / 2 + 2, height - 55 / 2 - 2 - 20, 73, 20, new TranslatableText("api.channels.invite.ignore"), w -> {
65+
if (invites.getSelected() != null) {
6666
w.active = false;
67-
ChannelRequest.ignoreChannelInvite(invites.getSelected().invite).thenRun(() -> client.execute(() -> init(client, width, height)));
68-
}
69-
}));
70-
addButton(new ButtonWidget(width / 2 - 75, height - 55 / 2 + 2, 150, 20, ScreenTexts.BACK, w -> onClose()));
71-
72-
updateButtons();
73-
}
74-
75-
@Override
76-
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
77-
invites.render(matrices, mouseX, mouseY, delta);
78-
super.render(matrices, mouseX, mouseY, delta);
79-
}
80-
81-
@Override
82-
public void onClose() {
83-
client.openScreen(parent);
84-
}
85-
86-
private void updateButtons() {
87-
denyButton.active = acceptButton.active = invites.getSelected() != null;
88-
}
89-
90-
private class InvitesListWidget extends AlwaysSelectedEntryListWidget<InvitesListWidget.InvitesListEntry> {
91-
92-
public InvitesListWidget(MinecraftClient client, int screenHeight, int y, int width, int height, int entryHeight) {
93-
super(client, width, screenHeight, y, y + height, entryHeight);
94-
ChannelRequest.getChannelInvites().thenAccept(list ->
95-
list.stream().map(InvitesListEntry::new).forEach(this::addEntry));
96-
}
97-
98-
@Override
99-
public boolean mouseClicked(double mouseX, double mouseY, int button) {
100-
boolean bl = super.mouseClicked(mouseX, mouseY, button);
101-
updateButtons();
102-
return bl;
103-
}
104-
105-
private class InvitesListEntry extends Entry<InvitesListEntry> {
106-
107-
private final ChannelInvite invite;
108-
109-
public InvitesListEntry(ChannelInvite invite) {
110-
this.invite = invite;
111-
}
112-
113-
@Override
114-
public void render(MatrixStack graphics, int index, int top, int left, int width, int height, int mouseX, int mouseY, boolean hovering, float partialTick) {
115-
drawTextWithShadow(graphics, textRenderer, new TranslatableText("api.channels.invite.name", invite.channelName()), left + 2, top + 2, -1);
116-
drawTextWithShadow(graphics, textRenderer, new TranslatableText("api.channels.invite.from", UUIDHelper.getUsername(invite.fromUuid())).setStyle(Style.EMPTY.withItalic(true)), left + 15, top + height - textRenderer.fontHeight - 1, 0x808080);
117-
118-
}
119-
}
120-
}
67+
ChannelRequest.ignoreChannelInvite(invites.getSelected().invite).thenRun(() -> client.execute(() -> init(client, width, height)));
68+
}
69+
}));
70+
addButton(new ButtonWidget(width / 2 - 75, height - 55 / 2 + 2, 150, 20, ScreenTexts.BACK, w -> onClose()));
71+
72+
updateButtons();
73+
}
74+
75+
@Override
76+
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
77+
invites.render(matrices, mouseX, mouseY, delta);
78+
super.render(matrices, mouseX, mouseY, delta);
79+
}
80+
81+
@Override
82+
public void onClose() {
83+
client.openScreen(parent);
84+
}
85+
86+
private void updateButtons() {
87+
denyButton.active = acceptButton.active = invites.getSelected() != null;
88+
}
89+
90+
private class InvitesListWidget extends AlwaysSelectedEntryListWidget<InvitesListWidget.InvitesListEntry> {
91+
92+
public InvitesListWidget(MinecraftClient client, int screenHeight, int y, int width, int height, int entryHeight) {
93+
super(client, width, screenHeight, y, y + height, entryHeight);
94+
ChannelRequest.getChannelInvites().thenAccept(list ->
95+
list.stream().map(InvitesListEntry::new).forEach(this::addEntry));
96+
}
97+
98+
@Override
99+
public boolean mouseClicked(double mouseX, double mouseY, int button) {
100+
boolean bl = super.mouseClicked(mouseX, mouseY, button);
101+
updateButtons();
102+
return bl;
103+
}
104+
105+
private class InvitesListEntry extends Entry<InvitesListEntry> {
106+
107+
private final ChannelInvite invite;
108+
109+
public InvitesListEntry(ChannelInvite invite) {
110+
this.invite = invite;
111+
}
112+
113+
@Override
114+
public void render(MatrixStack graphics, int index, int top, int left, int width, int height, int mouseX, int mouseY, boolean hovering, float partialTick) {
115+
drawTextWithShadow(graphics, textRenderer, new TranslatableText("api.channels.invite.name", invite.channelName()), left + 2, top + 2, -1);
116+
drawTextWithShadow(graphics, textRenderer, new TranslatableText("api.channels.invite.from", UUIDHelper.getUsername(invite.fromUuid())).setStyle(Style.EMPTY.withItalic(true)), left + 15, top + height - textRenderer.fontHeight - 1, 0x808080);
117+
118+
}
119+
}
120+
}
121121
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void render(MatrixStack graphics, int mouseX, int mouseY, float delta) {
6363
renderBackground(graphics);
6464
drawCenteredText(graphics, textRenderer, title, width / 2, 36 / 2 - textRenderer.fontHeight / 2, -1);
6565
super.render(graphics, mouseX, mouseY, delta);
66-
hoveredElement(mouseX, mouseY).filter(e -> e instanceof ButtonWidget).map(b -> (ButtonWidget)b).ifPresent(b -> b.renderToolTip(graphics, mouseX, mouseY));
66+
hoveredElement(mouseX, mouseY).filter(e -> e instanceof ButtonWidget).map(b -> (ButtonWidget) b).ifPresent(b -> b.renderToolTip(graphics, mouseX, mouseY));
6767
}
6868

6969
@Override

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private void addMessage(ChatMessage message) {
107107
boolean scrollToBottom = getScrollAmount() == getMaxScroll();
108108

109109
if (!messages.isEmpty()) {
110-
ChatMessage prev = messages.get(messages.size()-1);
110+
ChatMessage prev = messages.get(messages.size() - 1);
111111
if (!(prev.sender().equals(message.sender()) && prev.senderDisplayName().equals(message.senderDisplayName()))) {
112112
addEntry(new NameChatLine(message));
113113
} else {
@@ -192,30 +192,30 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
192192
tessellator.draw();
193193
}
194194
int k = this.getRowLeft();
195-
int l = this.top + 4 - (int)this.getScrollAmount();
195+
int l = this.top + 4 - (int) this.getScrollAmount();
196196

197197
this.renderList(matrices, k, l, mouseX, mouseY, delta);
198198
this.client.getTextureManager().bindTexture(DrawableHelper.OPTIONS_BACKGROUND_TEXTURE);
199199
RenderSystem.enableDepthTest();
200200
RenderSystem.depthFunc(519);
201201
bufferBuilder.begin(7, VertexFormats.POSITION_TEXTURE_COLOR);
202-
bufferBuilder.vertex(this.left, this.top, -100.0).texture(0.0F, (float)this.top / 32.0F).color(64, 64, 64, 255).next();
202+
bufferBuilder.vertex(this.left, this.top, -100.0).texture(0.0F, (float) this.top / 32.0F).color(64, 64, 64, 255).next();
203203
bufferBuilder.vertex(this.left + this.width, this.top, -100.0)
204-
.texture((float)this.width / 32.0F, (float)this.top / 32.0F)
204+
.texture((float) this.width / 32.0F, (float) this.top / 32.0F)
205205
.color(64, 64, 64, 255)
206206
.next();
207-
bufferBuilder.vertex(this.left + this.width, 0.0, -100.0).texture((float)this.width / 32.0F, 0.0F).color(64, 64, 64, 255).next();
207+
bufferBuilder.vertex(this.left + this.width, 0.0, -100.0).texture((float) this.width / 32.0F, 0.0F).color(64, 64, 64, 255).next();
208208
bufferBuilder.vertex(this.left, 0.0, -100.0).texture(0.0F, 0.0F).color(64, 64, 64, 255).next();
209-
bufferBuilder.vertex(this.left, this.height, -100.0).texture(0.0F, (float)this.height / 32.0F).color(64, 64, 64, 255).next();
209+
bufferBuilder.vertex(this.left, this.height, -100.0).texture(0.0F, (float) this.height / 32.0F).color(64, 64, 64, 255).next();
210210
bufferBuilder.vertex(this.left + this.width, this.height, -100.0)
211-
.texture((float)this.width / 32.0F, (float)this.height / 32.0F)
211+
.texture((float) this.width / 32.0F, (float) this.height / 32.0F)
212212
.color(64, 64, 64, 255)
213213
.next();
214214
bufferBuilder.vertex(this.left + this.width, this.bottom, -100.0)
215-
.texture((float)this.width / 32.0F, (float)this.bottom / 32.0F)
215+
.texture((float) this.width / 32.0F, (float) this.bottom / 32.0F)
216216
.color(64, 64, 64, 255)
217217
.next();
218-
bufferBuilder.vertex(this.left, this.bottom, -100.0).texture(0.0F, (float)this.bottom / 32.0F).color(64, 64, 64, 255).next();
218+
bufferBuilder.vertex(this.left, this.bottom, -100.0).texture(0.0F, (float) this.bottom / 32.0F).color(64, 64, 64, 255).next();
219219
tessellator.draw();
220220
RenderSystem.depthFunc(515);
221221
RenderSystem.disableDepthTest();
@@ -239,9 +239,9 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
239239
tessellator.draw();
240240
int o = this.getMaxScroll();
241241
if (o > 0) {
242-
int p = (int)((float)((this.bottom - this.top) * (this.bottom - this.top)) / (float)this.getMaxPosition());
242+
int p = (int) ((float) ((this.bottom - this.top) * (this.bottom - this.top)) / (float) this.getMaxPosition());
243243
p = MathHelper.clamp(p, 32, this.bottom - this.top - 8);
244-
int q = (int)this.getScrollAmount() * (this.bottom - this.top - p) / o + this.top;
244+
int q = (int) this.getScrollAmount() * (this.bottom - this.top - p) / o + this.top;
245245
if (q < this.top) {
246246
q = this.top;
247247
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,10 @@ public Persistence.Type getValue() {
147147
addButton(new ButtonWidget(width / 2 - 150 - 4, footerY, 150, 20, ScreenTexts.CANCEL, widget -> client.openScreen(parent)));
148148
addButton(new ButtonWidget(width / 2 + 4, footerY, 150, 20, ScreenTexts.DONE, widget -> {
149149
ChannelRequest.createChannel(nameField.getText(),
150-
Persistence.of(persistence.getValue(), count.get().get(), duration.get().get()),
151-
Arrays.stream(namesInput.getText().split(",")).filter(s -> !s.isEmpty()).map(UUIDHelper::ensureUuid).toArray(String[]::new))
152-
.thenRun(() -> client.execute(() -> client.openScreen(parent)));;
150+
Persistence.of(persistence.getValue(), count.get().get(), duration.get().get()),
151+
Arrays.stream(namesInput.getText().split(",")).filter(s -> !s.isEmpty()).map(UUIDHelper::ensureUuid).toArray(String[]::new))
152+
.thenRun(() -> client.execute(() -> client.openScreen(parent)));
153+
;
153154
}));
154155
}
155156

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public boolean mouseReleased(double mouseX, double mouseY, int button) {
203203
@Override
204204
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) {
205205
return super.mouseDragged(mouseX, mouseY, button, deltaX, deltaY)
206-
|| creditsList.mouseDragged(mouseX, mouseY, button, deltaX, deltaY);
206+
|| creditsList.mouseDragged(mouseX, mouseY, button, deltaX, deltaY);
207207
}
208208

209209
@Override

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public abstract class BuiltinModelItemRendererMixin {
4343
if (AxolotlClient.CONFIG.lowShield.get()
4444
&& MinecraftClient.getInstance().options.getPerspective().isFirstPerson()
4545
&& (mode.equals(ModelTransformation.Mode.FIRST_PERSON_LEFT_HAND)
46-
|| mode.equals(ModelTransformation.Mode.FIRST_PERSON_RIGHT_HAND))) {
46+
|| mode.equals(ModelTransformation.Mode.FIRST_PERSON_RIGHT_HAND))) {
4747
matrixStack.translate(0, 0.2F, 0);
4848
}
4949
}

0 commit comments

Comments
 (0)