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

Commit 4d0264d

Browse files
committed
adjust text field length
1 parent c6b527f commit 4d0264d

File tree

10 files changed

+55
-15
lines changed

10 files changed

+55
-15
lines changed

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/screenshotUtils/DownloadImageScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected void init() {
6161
urlBox.setSuggestion("");
6262
}
6363
});
64-
urlBox.setMaxLength(52);
64+
urlBox.setMaxLength(63);
6565
addButton(urlBox);
6666
addButton(new ButtonWidget(width / 2 + 100 + 4, height / 2 - 10, 20, 20, new TranslatableText("download"), b -> {
6767
String url = urlBox.getText().trim();

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/screenshotUtils/GalleryScreen.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,17 @@ protected void init() {
184184

185185
@Override
186186
public void onClose() {
187-
Tab.LOCAL.loadingCache().forEach((path, instance) -> client.getTextureManager().destroyTexture(instance.id()));
187+
Tab.LOCAL.loadingCache().forEach((path, instance) -> {
188+
if (instance != null) {
189+
client.getTextureManager().destroyTexture(instance.id());
190+
}
191+
});
188192
Tab.LOCAL.loadingCache().clear();
189-
Tab.SHARED.loadingCache().forEach((s, instance) -> client.getTextureManager().destroyTexture(instance.id()));
193+
Tab.SHARED.loadingCache().forEach((s, instance) -> {
194+
if (instance != null) {
195+
client.getTextureManager().destroyTexture(instance.id());
196+
}
197+
});
190198
Tab.SHARED.loadingCache().clear();
191199
Watcher.close(watcher);
192200
client.openScreen(parent);

1.20/src/main/java/io/github/axolotlclient/modules/screenshotUtils/DownloadImageScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected void init() {
6262
urlBox.setSuggestion("");
6363
}
6464
});
65-
urlBox.setMaxLength(52);
65+
urlBox.setMaxLength(63);
6666
addDrawableChild(urlBox);
6767
addDrawableChild(new ButtonWidget(width / 2 + 100 + 4, height / 2 - 10, 20, 20, Text.translatable("download"), b -> {
6868
String url = urlBox.getText().trim();

1.20/src/main/java/io/github/axolotlclient/modules/screenshotUtils/GalleryScreen.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,17 @@ protected void init() {
184184

185185
@Override
186186
public void closeScreen() {
187-
Tab.LOCAL.loadingCache().forEach((path, instance) -> client.getTextureManager().destroyTexture(instance.id()));
187+
Tab.LOCAL.loadingCache().forEach((path, instance) -> {
188+
if (instance != null) {
189+
client.getTextureManager().destroyTexture(instance.id());
190+
}
191+
});
188192
Tab.LOCAL.loadingCache().clear();
189-
Tab.SHARED.loadingCache().forEach((s, instance) -> client.getTextureManager().destroyTexture(instance.id()));
193+
Tab.SHARED.loadingCache().forEach((s, instance) -> {
194+
if (instance != null) {
195+
client.getTextureManager().destroyTexture(instance.id());
196+
}
197+
});
190198
Tab.SHARED.loadingCache().clear();
191199
Watcher.close(watcher);
192200
client.setScreen(parent);

1.21.4/src/main/java/io/github/axolotlclient/modules/screenshotUtils/DownloadImageScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected void init() {
6565
urlBox.setSuggestion("");
6666
}
6767
});
68-
urlBox.setMaxLength(52);
68+
urlBox.setMaxLength(63);
6969
var linear = hFL.addToContents(LinearLayout.horizontal().spacing(4));
7070
linear.defaultCellSetting().alignVerticallyMiddle();
7171
linear.addChild(urlBox);

1.21.4/src/main/java/io/github/axolotlclient/modules/screenshotUtils/GalleryScreen.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,17 @@ protected void init() {
180180

181181
@Override
182182
public void onClose() {
183-
Tab.LOCAL.loadingCache().forEach((path, instance) -> minecraft.getTextureManager().release(instance.id()));
183+
Tab.LOCAL.loadingCache().forEach((path, instance) -> {
184+
if (instance != null) {
185+
minecraft.getTextureManager().release(instance.id());
186+
}
187+
});
184188
Tab.LOCAL.loadingCache().clear();
185-
Tab.SHARED.loadingCache().forEach((s, instance) -> minecraft.getTextureManager().release(instance.id()));
189+
Tab.SHARED.loadingCache().forEach((s, instance) -> {
190+
if (instance != null) {
191+
minecraft.getTextureManager().release(instance.id());
192+
}
193+
});
186194
Tab.SHARED.loadingCache().clear();
187195
Watcher.close(watcher);
188196
minecraft.setScreen(parent);

1.21/src/main/java/io/github/axolotlclient/modules/screenshotUtils/DownloadImageScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected void init() {
6565
urlBox.setSuggestion("");
6666
}
6767
});
68-
urlBox.setMaxLength(52);
68+
urlBox.setMaxLength(63);
6969
var linear = hFL.addToContents(LinearLayoutWidget.createHorizontal().setSpacing(4));
7070
linear.copyDefaultSettings().alignVerticallyCenter();
7171
linear.add(urlBox);

1.21/src/main/java/io/github/axolotlclient/modules/screenshotUtils/GalleryScreen.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,17 @@ protected void init() {
181181

182182
@Override
183183
public void closeScreen() {
184-
Tab.LOCAL.loadingCache().forEach((path, instance) -> client.getTextureManager().destroyTexture(instance.id()));
184+
Tab.LOCAL.loadingCache().forEach((path, instance) -> {
185+
if (instance != null) {
186+
client.getTextureManager().destroyTexture(instance.id());
187+
}
188+
});
185189
Tab.LOCAL.loadingCache().clear();
186-
Tab.SHARED.loadingCache().forEach((s, instance) -> client.getTextureManager().destroyTexture(instance.id()));
190+
Tab.SHARED.loadingCache().forEach((s, instance) -> {
191+
if (instance != null) {
192+
client.getTextureManager().destroyTexture(instance.id());
193+
}
194+
});
187195
Tab.SHARED.loadingCache().clear();
188196
Watcher.close(watcher);
189197
client.setScreen(parent);

1.8.9/src/main/java/io/github/axolotlclient/modules/screenshotUtils/DownloadImageScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void render() {
6363
}
6464
}
6565
};
66-
urlBox.setMaxLength(52);
66+
urlBox.setMaxLength(63);
6767
buttons.add(new ButtonWidget(1, width / 2 + 100 + 4, height / 2 - 10, 20, 20, I18n.translate("download")) {
6868
@Override
6969
public void render(Minecraft client, int mouseX, int mouseY) {

1.8.9/src/main/java/io/github/axolotlclient/modules/screenshotUtils/GalleryScreen.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,17 @@ protected void buttonClicked(ButtonWidget buttonWidget) {
204204
case 2 -> setTab(Tab.SHARED);
205205
case 3 -> minecraft.openScreen(new DownloadImageScreen(this));
206206
case 4 -> {
207-
Tab.LOCAL.loadingCache().forEach((path, instance) -> minecraft.getTextureManager().close(instance.id()));
207+
Tab.LOCAL.loadingCache().forEach((path, instance) -> {
208+
if (instance != null) {
209+
minecraft.getTextureManager().close(instance.id());
210+
}
211+
});
208212
Tab.LOCAL.loadingCache().clear();
209-
Tab.SHARED.loadingCache().forEach((s, instance) -> minecraft.getTextureManager().close(instance.id()));
213+
Tab.SHARED.loadingCache().forEach((s, instance) -> {
214+
if (instance != null) {
215+
minecraft.getTextureManager().close(instance.id());
216+
}
217+
});
210218
Tab.SHARED.loadingCache().clear();
211219
Watcher.close(watcher);
212220
minecraft.openScreen(parent);

0 commit comments

Comments
 (0)