Skip to content

Commit 34fd44e

Browse files
committed
Avoid modifying old screen widgets on init of new screen, fix #80
1 parent 3f2035f commit 34fd44e

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.2.2
4+
5+
- Fixed a compatibility issue caused by removal of buttons on screen switch
6+
37
## 2.2.1
48

59
- Added an option to justify buttons right/bottom rather than the default left/top

common/src/main/java/dev/terminalmc/clientsort/client/gui/TriggerButtonManager.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ public static void afterScreenInit(Screen initScreen) {
112112
if (Minecraft.getInstance().player.isSpectator())
113113
return;
114114

115-
if (screen != null) {
116-
TriggerButtonManager.getContainerButtons()
117-
.forEach((b) -> ((ScreenAccessor) screen).clientsort$removeWidget(b));
118-
TriggerButtonManager.getPlayerButtons()
119-
.forEach((b) -> ((ScreenAccessor) screen).clientsort$removeWidget(b));
120-
}
121115
containerButtons.clear();
122116
visibleContainerButtons.clear();
123117
playerButtons.clear();

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
template_version=11
1111

1212
# Mod Version
13-
mod_version=2.2.1
13+
mod_version=2.2.2
1414
# 'STABLE', 'BETA' or 'ALPHA'
1515
mod_version_type=BETA
1616

0 commit comments

Comments
 (0)