mirror of
https://github.com/FabricMC/fabric.git
synced 2025-03-31 01:00:18 -04:00
Fix previous creative tab not being restored (#2751)
This commit is contained in:
parent
0db3bc5ba9
commit
d3d735d000
1 changed files with 4 additions and 1 deletions
|
@ -46,6 +46,9 @@ public abstract class CreativeInventoryScreenMixin<T extends ScreenHandler> exte
|
|||
@Shadow
|
||||
protected abstract void setSelectedTab(ItemGroup itemGroup_1);
|
||||
|
||||
@Shadow
|
||||
private static ItemGroup selectedTab;
|
||||
|
||||
// "static" matches selectedTab
|
||||
private static int fabric_currentPage = 0;
|
||||
|
||||
|
@ -96,7 +99,7 @@ public abstract class CreativeInventoryScreenMixin<T extends ScreenHandler> exte
|
|||
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
private void init(CallbackInfo info) {
|
||||
fabric_updateSelection();
|
||||
fabric_currentPage = fabric_getPage(selectedTab);
|
||||
|
||||
int xpos = x + 170;
|
||||
int ypos = y + 4;
|
||||
|
|
Loading…
Add table
Reference in a new issue