Skip to content

Commit 23f0b7a

Browse files
3.1.1 (gallery) (#136)
* [skip] fix maven publication * (1.20.1) fix chatWidget appearance * (1.8.9, 1.16_combat-6) add option to disable inventory potion offset * begin gallery implementation * add loading animations * add automatic reloading on file updates * port to the other versions * set mojang auth to only use http1.1 * fix various bugs * fix BedwarsPlayerStats parameter mismatch * fix more bugs * fix another batch of bugs * add options to display durability on the ArmorHud * add secondary key to freelook * add option to allow friends to access uploaded images in gallery * update API user agent to include game version - bump config library version to fix color option saving * fix CoordsHud bugs, add biome option * fix more armorhud bugs * (1.21.1) fix crash when using minimal item physics * some bug fixes * refactor some auth code again * (bedwars module) add a useful message for unknown bed break messages * fix another bug * fix more bugs - (1.21.1) remove custom sky module * (1.8.9) fix more custom sky-related bugs * skip skies with non-existent textures * add new bedwars messages - fix auth again * fix screenshot actions only affecting the most recent screenshot * Update fr_fr.json * Update fr_fr.json * (1.8.9) fix flashy chat animation * best-effort name formatting for biome locations - (1.20.1) fix nametag shadows * account for embed changes * fix back button position on DownloadImageScreen - fix TntTime for 1.21.4, rendering independent of other name tag attachments - make PingHud always ping the server * (1.21.4) lower TntTime display * adjust text field length * fix another few bugs * improve error handling for image upload failures * (1.8.9) fix ChatHud color/transparency issues * fix API-related buttons not appearing correctly on the TitleScreen * (1.8.9) "fix" raw mouse input option - by delegating to glfw since we now depend on it anyway * (1.21.4) fix hitcolor having red & blue channels swapped * (1.8.9) fix retrieving the glfw window handle * (1.20.1, 1.21.1) fix nametag-related bugs * (1.21.1, 1.21.4) fix hud color differences - (1.20.1) fix badge rendering * fix oversight * bump version * fix more bugs - some of which were only introduced in the previous commits * small badge rendering tweaks - fix race condition on API login * (1.20.1) fix nametag shadow * fix name shadow rendering while sneaking --------- Co-authored-by: CornetPanique86 <[email protected]>
1 parent 297d26d commit 23f0b7a

File tree

245 files changed

+9437
-4800
lines changed

Some content is hidden

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

245 files changed

+9437
-4800
lines changed

1.16_combat-6/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ dependencies {
5555
localRuntime("org.slf4j:slf4j-jdk14:1.7.36")
5656

5757
api("org.lwjgl:lwjgl-nanovg:3.3.2")
58-
runtimeOnly("org.lwjgl:lwjgl-nanovg:3.2.2:natives-linux")
59-
runtimeOnly("org.lwjgl:lwjgl-nanovg:3.2.2:natives-windows")
60-
runtimeOnly("org.lwjgl:lwjgl-nanovg:3.2.2:natives-macos")
58+
runtimeOnly("org.lwjgl:lwjgl-nanovg:3.3.2:natives-linux")
59+
runtimeOnly("org.lwjgl:lwjgl-nanovg:3.3.2:natives-windows")
60+
runtimeOnly("org.lwjgl:lwjgl-nanovg:3.3.2:natives-macos")
6161
}
6262

6363
tasks.processResources {
@@ -89,7 +89,7 @@ java {
8989
publishing {
9090
publications {
9191
create<MavenPublication>("mavenJava") {
92-
artifactId = project.name
92+
artifactId = base.archivesName.get()
9393
from(components["java"])
9494
}
9595
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ public void onInitializeClient() {
119119

120120
CONFIG.init();
121121

122-
new AxolotlClientCommon(LOGGER, () -> configManager);
123-
new API(LOGGER, Notifications.getInstance(), I18n::translate, new StatusUpdateProviderImpl(), APIOptions.getInstance());
122+
new AxolotlClientCommon(LOGGER, Notifications.getInstance(), () -> configManager);
123+
new API(LOGGER, I18n::translate, new StatusUpdateProviderImpl(), APIOptions.getInstance());
124124
ClientLifecycleEvents.CLIENT_STOPPING.register(c -> API.getInstance().shutdown());
125125

126126
modules.forEach(Module::init);

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import java.nio.file.Path;
2626
import java.util.function.Consumer;
27-
import java.util.function.Function;
2827

2928
import io.github.axolotlclient.AxolotlClient;
3029
import io.github.axolotlclient.AxolotlClientConfig.api.ui.screen.ConfigScreen;
@@ -75,12 +74,11 @@ public void init() {
7574
account.add(new GenericOption("api.account.usernames", "clickToOpen",
7675
() -> client.openScreen(new UsernameManagementScreen(client.currentScreen))));
7776
account.add(new GenericOption("api.account.export", "api.account.export_data", () -> ThreadExecuter.scheduleTask(() -> {
78-
Function<String, String> translate = API.getInstance().getTranslationProvider()::translate;
7977
try (MemoryStack stack = MemoryStack.stackPush()) {
8078
var pointers = stack.mallocPointer(1);
8179
pointers.put(stack.UTF8("*.json"));
8280
pointers.flip();
83-
var result = TinyFileDialogs.tinyfd_saveFileDialog(translate.apply("api.account.export.dialog_title"), FabricLoader.getInstance().getGameDir().toString(), pointers, null);
81+
var result = TinyFileDialogs.tinyfd_saveFileDialog("Choose export destination", FabricLoader.getInstance().getGameDir().toString(), pointers, null);
8482
if (result != null) {
8583
AccountDataRequest.get(Path.of(result));
8684
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.util.concurrent.atomic.AtomicInteger;
2727
import java.util.stream.Collectors;
2828

29+
import com.mojang.blaze3d.systems.RenderSystem;
2930
import io.github.axolotlclient.AxolotlClientConfig.impl.ui.Selectable;
3031
import io.github.axolotlclient.AxolotlClientConfig.impl.util.DrawUtil;
3132
import io.github.axolotlclient.api.chat.ChatWidget;
@@ -79,6 +80,8 @@ public void render(MatrixStack graphics, int mouseX, int mouseY, float delta) {
7980
graphics.translate(0, 0, 1000);
8081
fill(graphics, sidebarAnimX, 0, sidebarWidth + sidebarAnimX, height, 0x99000000);
8182

83+
RenderSystem.color3f(1, 1, 1);
84+
8285
textRenderer.drawWithShadow(graphics, I18n.translate("api.chats"), 10 + sidebarAnimX, 10, -1);
8386

8487
if (hasChat) {
@@ -91,6 +94,10 @@ public void render(MatrixStack graphics, int mouseX, int mouseY, float delta) {
9194
chatWidget.render(graphics, mouseX, mouseY, delta);
9295
}
9396

97+
if (list != null) {
98+
list.render(graphics, mouseX, mouseY, delta);
99+
}
100+
94101
super.render(graphics, mouseX, mouseY, delta);
95102

96103
contextMenu.render(graphics, mouseX, mouseY, delta);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public ChatListScreen(Screen parent) {
4848

4949
@Override
5050
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
51-
renderBackground(matrices);
51+
renderBackgroundTexture(0);
5252
dms.render(matrices, mouseX, mouseY, delta);
5353
groups.render(matrices, mouseX, mouseY, delta);
5454
super.render(matrices, mouseX, mouseY, delta);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public int getRowWidth() {
6969

7070
@Override
7171
protected int getScrollbarPositionX() {
72-
return super.getScrollbarPositionX() - 6;
72+
return getRowLeft() + width - 6;
7373
}
7474

7575
public ChatListWidget(ContextMenuScreen screen, int screenWidth, int screenHeight, int x, int y, int width, int height) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public ChatScreen(Screen parent, Channel channel) {
5454

5555
@Override
5656
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
57-
renderBackground(matrices);
57+
renderBackgroundTexture(0);
5858

5959
if (users != null) {
6060
users.render(matrices, mouseX, mouseY, delta);

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

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.util.List;
3131
import java.util.Objects;
3232

33+
import com.mojang.blaze3d.platform.GlStateManager;
3334
import com.mojang.blaze3d.systems.RenderSystem;
3435
import io.github.axolotlclient.api.API;
3536
import io.github.axolotlclient.api.ContextMenu;
@@ -43,12 +44,17 @@
4344
import io.github.axolotlclient.util.ClientColors;
4445
import lombok.Getter;
4546
import net.minecraft.client.MinecraftClient;
47+
import net.minecraft.client.gui.DrawableHelper;
4648
import net.minecraft.client.gui.screen.ConfirmScreen;
4749
import net.minecraft.client.gui.screen.Screen;
4850
import net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget;
51+
import net.minecraft.client.render.BufferBuilder;
52+
import net.minecraft.client.render.Tessellator;
53+
import net.minecraft.client.render.VertexFormats;
4954
import net.minecraft.client.util.math.MatrixStack;
5055
import net.minecraft.text.*;
5156
import net.minecraft.util.Identifier;
57+
import net.minecraft.util.math.MathHelper;
5258

5359
public class ChatWidget extends AlwaysSelectedEntryListWidget<ChatWidget.ChatLine> {
5460

@@ -157,6 +163,111 @@ protected void renderList(MatrixStack matrices, int x, int y, int mouseX, int mo
157163
DrawUtil.disableScissor();
158164
}
159165

166+
@Override
167+
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
168+
int i = this.getScrollbarPositionX();
169+
int j = i + 6;
170+
Tessellator tessellator = Tessellator.getInstance();
171+
BufferBuilder bufferBuilder = tessellator.getBuffer();
172+
this.client.getTextureManager().bindTexture(DrawableHelper.OPTIONS_BACKGROUND_TEXTURE);
173+
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
174+
if (client.world == null) {
175+
bufferBuilder.begin(7, VertexFormats.POSITION_TEXTURE_COLOR);
176+
bufferBuilder.vertex(this.left, this.bottom, 0.0)
177+
.texture((float) this.left / 32.0F, (float) (this.bottom + (int) this.getScrollAmount()) / 32.0F)
178+
.color(32, 32, 32, 255)
179+
.next();
180+
bufferBuilder.vertex(this.right, this.bottom, 0.0)
181+
.texture((float) this.right / 32.0F, (float) (this.bottom + (int) this.getScrollAmount()) / 32.0F)
182+
.color(32, 32, 32, 255)
183+
.next();
184+
bufferBuilder.vertex(this.right, this.top, 0.0)
185+
.texture((float) this.right / 32.0F, (float) (this.top + (int) this.getScrollAmount()) / 32.0F)
186+
.color(32, 32, 32, 255)
187+
.next();
188+
bufferBuilder.vertex(this.left, this.top, 0.0)
189+
.texture((float) this.left / 32.0F, (float) (this.top + (int) this.getScrollAmount()) / 32.0F)
190+
.color(32, 32, 32, 255)
191+
.next();
192+
tessellator.draw();
193+
}
194+
int k = this.getRowLeft();
195+
int l = this.top + 4 - (int)this.getScrollAmount();
196+
197+
this.renderList(matrices, k, l, mouseX, mouseY, delta);
198+
this.client.getTextureManager().bindTexture(DrawableHelper.OPTIONS_BACKGROUND_TEXTURE);
199+
RenderSystem.enableDepthTest();
200+
RenderSystem.depthFunc(519);
201+
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();
203+
bufferBuilder.vertex(this.left + this.width, this.top, -100.0)
204+
.texture((float)this.width / 32.0F, (float)this.top / 32.0F)
205+
.color(64, 64, 64, 255)
206+
.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();
208+
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();
210+
bufferBuilder.vertex(this.left + this.width, this.height, -100.0)
211+
.texture((float)this.width / 32.0F, (float)this.height / 32.0F)
212+
.color(64, 64, 64, 255)
213+
.next();
214+
bufferBuilder.vertex(this.left + this.width, this.bottom, -100.0)
215+
.texture((float)this.width / 32.0F, (float)this.bottom / 32.0F)
216+
.color(64, 64, 64, 255)
217+
.next();
218+
bufferBuilder.vertex(this.left, this.bottom, -100.0).texture(0.0F, (float)this.bottom / 32.0F).color(64, 64, 64, 255).next();
219+
tessellator.draw();
220+
RenderSystem.depthFunc(515);
221+
RenderSystem.disableDepthTest();
222+
RenderSystem.enableBlend();
223+
RenderSystem.blendFuncSeparate(
224+
GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SrcFactor.ZERO, GlStateManager.DstFactor.ONE
225+
);
226+
RenderSystem.disableAlphaTest();
227+
RenderSystem.shadeModel(7425);
228+
RenderSystem.disableTexture();
229+
int n = 4;
230+
bufferBuilder.begin(7, VertexFormats.POSITION_TEXTURE_COLOR);
231+
bufferBuilder.vertex(this.left, this.top + 4, 0.0).texture(0.0F, 1.0F).color(0, 0, 0, 0).next();
232+
bufferBuilder.vertex(this.right, this.top + 4, 0.0).texture(1.0F, 1.0F).color(0, 0, 0, 0).next();
233+
bufferBuilder.vertex(this.right, this.top, 0.0).texture(1.0F, 0.0F).color(0, 0, 0, 255).next();
234+
bufferBuilder.vertex(this.left, this.top, 0.0).texture(0.0F, 0.0F).color(0, 0, 0, 255).next();
235+
bufferBuilder.vertex(this.left, this.bottom, 0.0).texture(0.0F, 1.0F).color(0, 0, 0, 255).next();
236+
bufferBuilder.vertex(this.right, this.bottom, 0.0).texture(1.0F, 1.0F).color(0, 0, 0, 255).next();
237+
bufferBuilder.vertex(this.right, this.bottom - 4, 0.0).texture(1.0F, 0.0F).color(0, 0, 0, 0).next();
238+
bufferBuilder.vertex(this.left, this.bottom - 4, 0.0).texture(0.0F, 0.0F).color(0, 0, 0, 0).next();
239+
tessellator.draw();
240+
int o = this.getMaxScroll();
241+
if (o > 0) {
242+
int p = (int)((float)((this.bottom - this.top) * (this.bottom - this.top)) / (float)this.getMaxPosition());
243+
p = MathHelper.clamp(p, 32, this.bottom - this.top - 8);
244+
int q = (int)this.getScrollAmount() * (this.bottom - this.top - p) / o + this.top;
245+
if (q < this.top) {
246+
q = this.top;
247+
}
248+
249+
bufferBuilder.begin(7, VertexFormats.POSITION_TEXTURE_COLOR);
250+
bufferBuilder.vertex(i, this.bottom, 0.0).texture(0.0F, 1.0F).color(0, 0, 0, 255).next();
251+
bufferBuilder.vertex(j, this.bottom, 0.0).texture(1.0F, 1.0F).color(0, 0, 0, 255).next();
252+
bufferBuilder.vertex(j, this.top, 0.0).texture(1.0F, 0.0F).color(0, 0, 0, 255).next();
253+
bufferBuilder.vertex(i, this.top, 0.0).texture(0.0F, 0.0F).color(0, 0, 0, 255).next();
254+
bufferBuilder.vertex(i, q + p, 0.0).texture(0.0F, 1.0F).color(128, 128, 128, 255).next();
255+
bufferBuilder.vertex(j, q + p, 0.0).texture(1.0F, 1.0F).color(128, 128, 128, 255).next();
256+
bufferBuilder.vertex(j, q, 0.0).texture(1.0F, 0.0F).color(128, 128, 128, 255).next();
257+
bufferBuilder.vertex(i, q, 0.0).texture(0.0F, 0.0F).color(128, 128, 128, 255).next();
258+
bufferBuilder.vertex(i, q + p - 1, 0.0).texture(0.0F, 1.0F).color(192, 192, 192, 255).next();
259+
bufferBuilder.vertex(j - 1, q + p - 1, 0.0).texture(1.0F, 1.0F).color(192, 192, 192, 255).next();
260+
bufferBuilder.vertex(j - 1, q, 0.0).texture(1.0F, 0.0F).color(192, 192, 192, 255).next();
261+
bufferBuilder.vertex(i, q, 0.0).texture(0.0F, 0.0F).color(192, 192, 192, 255).next();
262+
tessellator.draw();
263+
}
264+
265+
RenderSystem.enableTexture();
266+
RenderSystem.shadeModel(7424);
267+
RenderSystem.enableAlphaTest();
268+
RenderSystem.disableBlend();
269+
}
270+
160271
public class ChatLine extends Entry<ChatLine> {
161272
protected final MinecraftClient client = MinecraftClient.getInstance();
162273
@Getter

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

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import java.util.ArrayList;
2626
import java.util.List;
27+
import java.util.Objects;
2728

2829
import com.mojang.blaze3d.systems.RenderSystem;
2930
import io.github.axolotlclient.AxolotlClient;
@@ -32,6 +33,7 @@
3233
import io.github.axolotlclient.AxolotlClientConfig.api.ui.ConfigUI;
3334
import io.github.axolotlclient.AxolotlClientConfig.api.util.Color;
3435
import io.github.axolotlclient.AxolotlClientConfig.impl.options.*;
36+
import io.github.axolotlclient.CommonOptions;
3537
import io.github.axolotlclient.config.screen.CreditsScreen;
3638
import io.github.axolotlclient.mixin.OverlayTextureAccessor;
3739
import io.github.axolotlclient.util.options.ForceableBooleanOption;
@@ -88,6 +90,7 @@ public class AxolotlClientConfig {
8890
public final BooleanOption minimalViewBob = new BooleanOption("minimalViewBob", false);
8991
public final BooleanOption noHurtCam = new BooleanOption("noHurtCam", false);
9092
public final BooleanOption flatItems = new BooleanOption("flatItems", false);
93+
public final BooleanOption inventoryPotionEffectOffset = new BooleanOption("inventory.potion_effect_offset", true);
9194

9295
public final ColorOption loadingScreenColor = new ColorOption("loadingBgColor", new Color(239, 50, 61, 255));
9396
public final BooleanOption nightMode = new BooleanOption("nightMode", false);
@@ -144,17 +147,23 @@ public void init() {
144147
general.add(customWindowTitle);
145148
general.add(openCredits);
146149
general.add(debugLogOutput);
150+
general.add(CommonOptions.datetimeFormat);
147151
ConfigUI.getInstance().runWhenLoaded(() -> {
148-
StringArrayOption configStyle;
149-
general.add(configStyle = new StringArrayOption("configStyle",
150-
ConfigUI.getInstance().getStyleNames().stream().map(s -> "configStyle." + s)
151-
.toArray(String[]::new),
152-
"configStyle." + ConfigUI.getInstance().getCurrentStyle().getName(), s -> {
153-
ConfigUI.getInstance().setStyle(s.split("\\.")[1]);
154-
MinecraftClient.getInstance().openScreen(null);
155-
}));
156-
AxolotlClient.configManager.load();
157-
ConfigUI.getInstance().setStyle(configStyle.get().split("\\.")[1]);
152+
general.getOptions().removeIf(o -> "configStyle".equals(o.getName()));
153+
boolean isPojavLauncher = Objects.requireNonNullElse(System.getenv("TMPDIR"), "").contains("/Android/data/net.kdt.pojavlaunch/");
154+
String[] themes = ConfigUI.getInstance().getStyleNames().stream().map(s -> "configStyle." + s)
155+
.filter(s -> !isPojavLauncher || !s.startsWith("rounded"))
156+
.toArray(String[]::new);
157+
if (themes.length > 1) {
158+
StringArrayOption configStyle;
159+
general.add(configStyle = new StringArrayOption("configStyle", themes,
160+
"configStyle." + ConfigUI.getInstance().getCurrentStyle().getName(), s -> {
161+
ConfigUI.getInstance().setStyle(s.split("\\.")[1]);
162+
MinecraftClient.getInstance().openScreen(null);
163+
}));
164+
AxolotlClient.configManager.load();
165+
ConfigUI.getInstance().setStyle(configStyle.get().split("\\.")[1]);
166+
}
158167
});
159168

160169
rendering.add(customSky,
@@ -166,7 +175,8 @@ public void init() {
166175
hitColor,
167176
minimalViewBob,
168177
flatItems,
169-
noHurtCam);
178+
noHurtCam,
179+
inventoryPotionEffectOffset);
170180

171181
timeChanger.add(timeChangerEnabled);
172182
timeChanger.add(customTime);
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright © 2024 moehreag <[email protected]> & Contributors
3+
*
4+
* This file is part of AxolotlClient.
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*
20+
* For more information, see the LICENSE file.
21+
*/
22+
23+
package io.github.axolotlclient.mixin;
24+
25+
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
26+
import io.github.axolotlclient.AxolotlClient;
27+
import net.minecraft.client.gui.screen.ingame.AbstractInventoryScreen;
28+
import org.spongepowered.asm.mixin.Mixin;
29+
import org.spongepowered.asm.mixin.injection.At;
30+
31+
@Mixin(AbstractInventoryScreen.class)
32+
public class AbstractInventoryScreenMixin {
33+
34+
@WrapWithCondition(method = "applyStatusEffectOffset", at = @At(value = "FIELD", target = "Lnet/minecraft/client/gui/screen/ingame/AbstractInventoryScreen;x:I"))
35+
private boolean noInventoryShift(AbstractInventoryScreen<?> instance, int value) {
36+
37+
return AxolotlClient.CONFIG.inventoryPotionEffectOffset.get();
38+
}
39+
}

0 commit comments

Comments
 (0)