forked from gbl/AdvancementInfo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
save scroll pos, sort tabs, drag to scroll
- Loading branch information
Showing
5 changed files
with
101 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
src/main/java/de/guntram/mcmod/advancementinfo/duck/IClientAdvancementManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package de.guntram.mcmod.advancementinfo.duck; | ||
|
||
public interface IClientAdvancementManager { | ||
int getTabScrollPos(); | ||
void setTabScrollPos(int pos); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/de/guntram/mcmod/advancementinfo/mixin/ClientAdvancementManagerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.guntram.mcmod.advancementinfo.mixin; | ||
|
||
import de.guntram.mcmod.advancementinfo.duck.IClientAdvancementManager; | ||
import net.minecraft.client.network.ClientAdvancementManager; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(ClientAdvancementManager.class) | ||
public class ClientAdvancementManagerMixin implements IClientAdvancementManager { | ||
private int tabScrollPos; | ||
|
||
@Override | ||
public int getTabScrollPos() { | ||
return tabScrollPos; | ||
} | ||
|
||
public void setTabScrollPos(int tabScrollPos) { | ||
this.tabScrollPos = tabScrollPos; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/de/guntram/mcmod/advancementinfo/mixin/accessors/AdvancementTabAccessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package de.guntram.mcmod.advancementinfo.mixin.accessors; | ||
|
||
import net.minecraft.client.gui.screen.advancement.AdvancementTab; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Mutable; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(AdvancementTab.class) | ||
public interface AdvancementTabAccessor { | ||
@Mutable | ||
@Accessor | ||
void setIndex(int i); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters