-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
92 changed files
with
1,578 additions
and
40 deletions.
There are no files selected for viewing
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
9 changes: 9 additions & 0 deletions
9
...a/com/github/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/AEBaseGuiMixin.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,9 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.AEBaseGui; | ||
import com.github.thebrochacho.dws.interfaces.IDWSGui; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(AEBaseGui.class) | ||
public abstract class AEBaseGuiMixin implements IDWSGui { | ||
} |
18 changes: 18 additions & 0 deletions
18
...ithub/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiCellWorkbenchMixin.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,18 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.implementations.GuiCellWorkbench; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(GuiCellWorkbench.class) | ||
public abstract class GuiCellWorkbenchMixin { | ||
@ModifyConstant(method = "drawBG", | ||
constant = { @Constant(intValue = 177), | ||
@Constant(intValue = 178) }, | ||
remap = false, | ||
require = 23) | ||
private int modifyGuiXSize(int constant) { | ||
return constant + 162; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...va/com/github/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiChestMixin.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,31 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.AEBaseGui; | ||
import appeng.client.gui.implementations.GuiChest; | ||
import appeng.client.gui.widgets.GuiTabButton; | ||
import net.minecraft.inventory.Container; | ||
import org.spongepowered.asm.lib.Opcodes; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(GuiChest.class) | ||
public abstract class GuiChestMixin extends AEBaseGui { | ||
@Shadow(remap = false) | ||
private GuiTabButton priority; | ||
|
||
public GuiChestMixin(Container container) { | ||
super(container); | ||
} | ||
|
||
@Redirect(method = "initGui", | ||
at = @At(value = "FIELD", | ||
target = "Lappeng/client/gui/implementations/GuiChest;priority:Lappeng/client/gui/widgets/GuiTabButton;", | ||
opcode = Opcodes.PUTFIELD), | ||
require = 1) | ||
private void redirectPriorityButtonInstantiation(GuiChest instance, GuiTabButton value) { | ||
value.xPosition = this.guiLeft + this.xSize - 22; | ||
this.priority = value; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...om/github/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiCondenserMixin.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,24 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.implementations.GuiCondenser; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(GuiCondenser.class) | ||
public abstract class GuiCondenserMixin { | ||
@ModifyConstant(method = "initGui", | ||
constant = { @Constant(intValue = 120), | ||
@Constant(intValue = 128) }, | ||
require = 1) | ||
private int modifyButtonXOffset(int constant) { | ||
return constant + 81; | ||
} | ||
|
||
@ModifyConstant(method = "initGui", | ||
constant = @Constant(intValue = 178), | ||
require = 1) | ||
private int modifyProgressBarUVXOffset(int constant) { | ||
return 340; | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
.../github/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiCraftAmountMixin.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,57 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.AEBaseGui; | ||
import appeng.client.gui.implementations.GuiCraftAmount; | ||
import appeng.client.gui.widgets.GuiNumberBox; | ||
import appeng.client.gui.widgets.GuiTabButton; | ||
import net.minecraft.inventory.Container; | ||
import org.spongepowered.asm.lib.Opcodes; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.ModifyArgs; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import org.spongepowered.asm.mixin.injection.invoke.arg.Args; | ||
|
||
@Mixin(GuiCraftAmount.class) | ||
public abstract class GuiCraftAmountMixin extends AEBaseGui { | ||
@Shadow(remap = false) | ||
private GuiTabButton originalGuiBtn; | ||
|
||
@Shadow(remap = false) | ||
private GuiNumberBox amountToCraft; | ||
|
||
public GuiCraftAmountMixin(Container container) { | ||
super(container); | ||
} | ||
|
||
@ModifyArgs(method = "initGui", | ||
at = @At(value = "INVOKE", | ||
target = "Lnet/minecraft/client/gui/GuiButton;<init>(IIIIILjava/lang/String;)V"), | ||
require = 9) | ||
private void modifyGuiButtonArgs(Args args) { | ||
args.set(1, (int) args.get(1) + 78); | ||
args.set(2, (int) args.get(2) - 8); | ||
} | ||
|
||
@Redirect(method = "initGui", | ||
at = @At(value = "FIELD", | ||
target = "Lappeng/client/gui/implementations/GuiCraftAmount;originalGuiBtn:Lappeng/client/gui/widgets/GuiTabButton;", | ||
opcode = Opcodes.PUTFIELD), | ||
require = 1) | ||
private void redirectOriginalGuiBtnInstantiation(GuiCraftAmount instance, GuiTabButton value) { | ||
value.xPosition = this.guiLeft + this.xSize - 22; | ||
this.originalGuiBtn = value; | ||
} | ||
|
||
@Redirect(method = "initGui", | ||
at = @At(value = "FIELD", | ||
target = "Lappeng/client/gui/implementations/GuiCraftAmount;amountToCraft:Lappeng/client/gui/widgets/GuiNumberBox;", | ||
opcode = Opcodes.PUTFIELD), | ||
require = 1) | ||
private void redirectNewTextboxPosition(GuiCraftAmount instance, GuiNumberBox value) { | ||
value.xPosition += 78; | ||
value.yPosition -= 8; | ||
this.amountToCraft = value; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...github/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiCraftingTermMixin.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,16 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.implementations.GuiCraftingTerm; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(GuiCraftingTerm.class) | ||
public abstract class GuiCraftingTermMixin { | ||
@ModifyConstant(method = "initGui", | ||
constant = @Constant(intValue = 92), | ||
require = 1) | ||
private int modifyButtonXOffset(int constant) { | ||
return constant + 81; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...va/com/github/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiDriveMixin.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,31 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.AEBaseGui; | ||
import appeng.client.gui.implementations.GuiDrive; | ||
import appeng.client.gui.widgets.GuiTabButton; | ||
import net.minecraft.inventory.Container; | ||
import org.spongepowered.asm.lib.Opcodes; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(GuiDrive.class) | ||
public abstract class GuiDriveMixin extends AEBaseGui { | ||
@Shadow(remap = false) | ||
private GuiTabButton priority; | ||
|
||
public GuiDriveMixin(Container container) { | ||
super(container); | ||
} | ||
|
||
@Redirect(method = "initGui", | ||
at = @At(value = "FIELD", | ||
target = "Lappeng/client/gui/implementations/GuiDrive;priority:Lappeng/client/gui/widgets/GuiTabButton;", | ||
opcode = Opcodes.PUTFIELD), | ||
require = 1) | ||
private void redirectPriorityLocation(GuiDrive instance, GuiTabButton value) { | ||
value.xPosition = this.guiLeft + this.xSize - 22; | ||
this.priority = value; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...thub/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiFormationPlaneMixin.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,34 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.api.implementations.IUpgradeableHost; | ||
import appeng.client.gui.implementations.GuiFormationPlane; | ||
import appeng.client.gui.implementations.GuiUpgradeable; | ||
import appeng.client.gui.widgets.GuiTabButton; | ||
import net.minecraft.entity.player.InventoryPlayer; | ||
import org.spongepowered.asm.lib.Opcodes; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(GuiFormationPlane.class) | ||
public abstract class GuiFormationPlaneMixin extends GuiUpgradeable { | ||
|
||
@Shadow(remap = false) | ||
private GuiTabButton priority; | ||
|
||
public GuiFormationPlaneMixin(InventoryPlayer inventoryPlayer, IUpgradeableHost te) { | ||
super(inventoryPlayer, te); | ||
} | ||
|
||
@Redirect(method = "addButtons", | ||
at = @At(value = "FIELD", | ||
target = "Lappeng/client/gui/implementations/GuiFormationPlane;priority:Lappeng/client/gui/widgets/GuiTabButton;", | ||
opcode = Opcodes.PUTFIELD), | ||
remap = false, | ||
require = 1) | ||
private void redirectPriorityLocation(GuiFormationPlane instance, GuiTabButton value) { | ||
value.xPosition = this.guiLeft + this.xSize - 22 - (35 * (this.hasToolbox() ? 2 : 1)); | ||
this.priority = value; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...a/com/github/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiIOPortMixin.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,18 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.implementations.GuiIOPort; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(GuiIOPort.class) | ||
public abstract class GuiIOPortMixin { | ||
@ModifyConstant(method = "drawBG", | ||
constant = { @Constant(intValue = 66), | ||
@Constant(intValue = 94), }, | ||
remap = false, | ||
require = 2) | ||
private int modifyItemHintXOffset(int constant) { | ||
return constant + 81; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...om/github/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiInscriberMixin.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,36 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.implementations.GuiInscriber; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(GuiInscriber.class) | ||
public abstract class GuiInscriberMixin { | ||
@ModifyConstant(method = { "<init>", | ||
"drawBG" }, | ||
constant = { @Constant(intValue = 177), | ||
@Constant(intValue = 178), | ||
@Constant(intValue = 211), | ||
@Constant(intValue = 246) }, | ||
remap = false, | ||
require = 7) | ||
private int modifyGuiXSize(int constant) { | ||
return constant + 162; | ||
} | ||
|
||
@ModifyConstant(method = "initGui", | ||
constant = @Constant(intValue = 135), | ||
require = 2) | ||
private int modifyProgressBarXOffset(int constant) { | ||
return constant + 81; | ||
} | ||
|
||
@ModifyConstant(method = "drawBG", | ||
constant = @Constant(intValue = 135), | ||
remap = false, | ||
require = 1) | ||
private int modifyProgressBarUVXOffset(int constant) { | ||
return constant + 81; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...om/github/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiInterfaceMixin.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,33 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.api.implementations.IUpgradeableHost; | ||
import appeng.client.gui.implementations.GuiInterface; | ||
import appeng.client.gui.implementations.GuiUpgradeable; | ||
import appeng.client.gui.widgets.GuiTabButton; | ||
import net.minecraft.entity.player.InventoryPlayer; | ||
import org.spongepowered.asm.lib.Opcodes; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(GuiInterface.class) | ||
public abstract class GuiInterfaceMixin extends GuiUpgradeable { | ||
@Shadow(remap = false) | ||
private GuiTabButton priority; | ||
|
||
public GuiInterfaceMixin(InventoryPlayer inventoryPlayer, IUpgradeableHost te) { | ||
super(inventoryPlayer, te); | ||
} | ||
|
||
@Redirect(method = "addButtons", | ||
at = @At(value = "FIELD", | ||
target = "Lappeng/client/gui/implementations/GuiInterface;priority:Lappeng/client/gui/widgets/GuiTabButton;", | ||
opcode = Opcodes.PUTFIELD), | ||
remap = false, | ||
require = 1) | ||
private void redirectPriorityButtonAssignment(GuiInterface instance, GuiTabButton value) { | ||
value.xPosition = this.guiLeft + this.xSize - 22 - (35 * (this.hasToolbox() ? 2 : 1)); | ||
this.priority = value; | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...b/thebrochacho/dws/mixin/mixins/client/appliedenergistics2/GuiInterfaceTerminalMixin.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,57 @@ | ||
package com.github.thebrochacho.dws.mixin.mixins.client.appliedenergistics2; | ||
|
||
import appeng.client.gui.AEBaseGui; | ||
import appeng.client.gui.implementations.GuiInterfaceTerminal; | ||
import net.minecraft.inventory.Container; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(GuiInterfaceTerminal.class) | ||
public abstract class GuiInterfaceTerminalMixin extends AEBaseGui { | ||
public GuiInterfaceTerminalMixin(Container container) { | ||
super(container); | ||
} | ||
|
||
@ModifyConstant(method = "<init>", | ||
constant = @Constant(intValue = 195), | ||
remap = false, | ||
require = 1) | ||
private int modifyXSize(int constant) { | ||
return constant + 143; | ||
} | ||
|
||
@ModifyConstant(method = "initGui", | ||
constant = @Constant(intValue = 175), | ||
require = 1) | ||
private int modifyScrollbarXOffset(int constant) { | ||
return constant + 81; | ||
} | ||
|
||
@ModifyConstant(method = { "drawFG", | ||
"drawBG" }, | ||
constant = { @Constant(intValue = 7, | ||
ordinal = 0), | ||
@Constant(intValue = 8, | ||
ordinal = 2), | ||
@Constant(intValue = 10) }, | ||
remap = false, | ||
require = 3) | ||
private int modifySlotXOffset(int constant) { | ||
return constant + 81; | ||
} | ||
|
||
@ModifyConstant(method = "initGui", | ||
constant = @Constant(intValue = 104), | ||
require = 1) | ||
private int modifySearchBarXOffset(int constant) { | ||
return 128; | ||
} | ||
|
||
@ModifyConstant(method = "initGui", | ||
constant = @Constant(intValue = 65), | ||
require = 1) | ||
private int modifySearchBarWidth(int constant) { | ||
return 122; | ||
} | ||
} |
Oops, something went wrong.