Skip to content

Commit

Permalink
Release v3.11.1+fabric-1.21
Browse files Browse the repository at this point in the history
Fixed #120.
  • Loading branch information
TheCSDev committed Jun 15, 2024
1 parent 08ec355 commit 1d852c4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion betterstats-3-fabric-1.20.5/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ org.gradle.jvmargs=-Xmx1G
mod_name = Better Statistics Screen
mod_description = Improves the statistics screen and makes it more useful.
mod_author = TheCSDev
mod_version = 3.11+fabric-1.20.6
mod_version = 3.11.1+fabric-1.20.6

# Here you link the source code repository links:
mod_contact_homepage = https://github.com/TheCSMods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import io.github.thecsdev.tcdcommons.api.events.item.ItemGroupEvent;
import io.github.thecsdev.tcdcommons.api.hooks.client.gui.widget.ButtonWidgetHooks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.item.ItemGroups;

public final class BetterStatsClient extends BetterStats
{
Expand Down Expand Up @@ -68,7 +68,10 @@ public BetterStatsClient()
final var useOp = //Important: Must copy the exact values used by CreativeInventoryScreen
client.player.isCreativeLevelTwoOp() &&
MC_CLIENT.options.getOperatorItemsTab().getValue();
ItemGroups.updateDisplayContext(world.getEnabledFeatures(), useOp, world.getRegistryManager());

//create an instance of the creative inventory, as it is the one that updates
//item groups and the search item group (in other words, let the game do it)
new CreativeInventoryScreen(client.player, world.getEnabledFeatures(), useOp);
});
}
// ==================================================
Expand Down
2 changes: 1 addition & 1 deletion betterstats-3-fabric-1.21/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ org.gradle.jvmargs=-Xmx1G
mod_name = Better Statistics Screen
mod_description = Improves the statistics screen and makes it more useful.
mod_author = TheCSDev
mod_version = 3.11+fabric-1.21
mod_version = 3.11.1+fabric-1.21

# Here you link the source code repository links:
mod_contact_homepage = https://github.com/TheCSMods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import io.github.thecsdev.tcdcommons.api.events.item.ItemGroupEvent;
import io.github.thecsdev.tcdcommons.api.hooks.client.gui.widget.ButtonWidgetHooks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.item.ItemGroups;

public final class BetterStatsClient extends BetterStats
{
Expand Down Expand Up @@ -68,7 +68,10 @@ public BetterStatsClient()
final var useOp = //Important: Must copy the exact values used by CreativeInventoryScreen
client.player.isCreativeLevelTwoOp() &&
MC_CLIENT.options.getOperatorItemsTab().getValue();
ItemGroups.updateDisplayContext(world.getEnabledFeatures(), useOp, world.getRegistryManager());

//create an instance of the creative inventory, as it is the one that updates
//item groups and the search item group (in other words, let the game do it)
new CreativeInventoryScreen(client.player, world.getEnabledFeatures(), useOp);
});
}
// ==================================================
Expand Down

0 comments on commit 1d852c4

Please sign in to comment.