AE
This commit is contained in:
parent
a214fc6371
commit
078c82bdf4
|
|
@ -13,11 +13,11 @@ import java.util.ArrayList;
|
||||||
@Mixin(value = PatternAccessTermScreen.class, remap = false)
|
@Mixin(value = PatternAccessTermScreen.class, remap = false)
|
||||||
public interface PatternAccessTermScreenAccessor {
|
public interface PatternAccessTermScreenAccessor {
|
||||||
@Accessor("scrollbar")
|
@Accessor("scrollbar")
|
||||||
Scrollbar getScrollbar();
|
Scrollbar eap$getScrollbar();
|
||||||
|
|
||||||
@Accessor("visibleRows")
|
@Accessor("visibleRows")
|
||||||
int getVisibleRows();
|
int eap$getVisibleRows();
|
||||||
|
|
||||||
@Accessor("rows")
|
@Accessor("rows")
|
||||||
ArrayList<?> getRows();
|
ArrayList<?> eap$getRows();
|
||||||
}
|
}
|
||||||
|
|
@ -10,11 +10,11 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
@Mixin(targets = "appeng.client.gui.me.patternaccess.PatternAccessTermScreen$SlotsRow", remap = false)
|
@Mixin(targets = "appeng.client.gui.me.patternaccess.PatternAccessTermScreen$SlotsRow", remap = false)
|
||||||
public interface PatternAccessTermScreenSlotsRowAccessor {
|
public interface PatternAccessTermScreenSlotsRowAccessor {
|
||||||
@Accessor("container")
|
@Accessor("container")
|
||||||
PatternContainerRecord getContainer();
|
PatternContainerRecord eap$getContainer();
|
||||||
|
|
||||||
@Accessor("offset")
|
@Accessor("offset")
|
||||||
int getOffset();
|
int eap$getOffset();
|
||||||
|
|
||||||
@Accessor("slots")
|
@Accessor("slots")
|
||||||
int getSlots();
|
int eap$getSlots();
|
||||||
}
|
}
|
||||||
|
|
@ -38,7 +38,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
@Mixin(AEBaseScreen.class)
|
@Mixin(value = AEBaseScreen.class, remap = false)
|
||||||
public abstract class AEBaseScreenMixin {
|
public abstract class AEBaseScreenMixin {
|
||||||
|
|
||||||
@Unique
|
@Unique
|
||||||
|
|
@ -56,7 +56,7 @@ public abstract class AEBaseScreenMixin {
|
||||||
* 在 AEBaseScreen 的 mouseClicked 入口拦截 CraftingCPUScreen 的 Shift+左键,
|
* 在 AEBaseScreen 的 mouseClicked 入口拦截 CraftingCPUScreen 的 Shift+左键,
|
||||||
* 读取鼠标下的 AEKey 并发送 CraftingMonitorJumpC2SPacket。
|
* 读取鼠标下的 AEKey 并发送 CraftingMonitorJumpC2SPacket。
|
||||||
*/
|
*/
|
||||||
@Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true, remap = false)
|
||||||
private void eap$craftingCpuShiftLeftClick(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
|
private void eap$craftingCpuShiftLeftClick(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
|
||||||
// 仅处理 CraftingCPUScreen 实例
|
// 仅处理 CraftingCPUScreen 实例
|
||||||
Object self = this;
|
Object self = this;
|
||||||
|
|
@ -90,7 +90,7 @@ public abstract class AEBaseScreenMixin {
|
||||||
* 在 AEBaseScreen 的 mouseClicked 入口拦截 CraftingCPUScreen 的 Shift+右键,
|
* 在 AEBaseScreen 的 mouseClicked 入口拦截 CraftingCPUScreen 的 Shift+右键,
|
||||||
* 读取鼠标下的 AEKey 并发送 CraftingMonitorOpenProviderC2SPacket(打开样板供应器UI)。
|
* 读取鼠标下的 AEKey 并发送 CraftingMonitorOpenProviderC2SPacket(打开样板供应器UI)。
|
||||||
*/
|
*/
|
||||||
@Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true, remap = false)
|
||||||
private void eap$craftingCpuShiftRightClick(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
|
private void eap$craftingCpuShiftRightClick(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
|
||||||
// 仅处理 CraftingCPUScreen 实例
|
// 仅处理 CraftingCPUScreen 实例
|
||||||
Object self = this;
|
Object self = this;
|
||||||
|
|
@ -153,7 +153,7 @@ public abstract class AEBaseScreenMixin {
|
||||||
/**
|
/**
|
||||||
* 重写renderSlot方法,为所有可见的样板槽位添加数量显示
|
* 重写renderSlot方法,为所有可见的样板槽位添加数量显示
|
||||||
*/
|
*/
|
||||||
@Inject(method = "renderSlot", at = @At("TAIL"))
|
@Inject(method = "renderSlot", at = @At("TAIL"), remap = false)
|
||||||
private void eap$renderSlotAmounts(GuiGraphics guiGraphics, Slot s, CallbackInfo ci) {
|
private void eap$renderSlotAmounts(GuiGraphics guiGraphics, Slot s, CallbackInfo ci) {
|
||||||
Object self = this;
|
Object self = this;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,13 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
* 点击后把当前“已编码样板”上传到任意可用的样板供应器(服务端自动选择)。
|
* 点击后把当前“已编码样板”上传到任意可用的样板供应器(服务端自动选择)。
|
||||||
* 通过解析 AE2 样式中 encodePattern 的坐标,将按钮放在其左侧紧挨位置。
|
* 通过解析 AE2 样式中 encodePattern 的坐标,将按钮放在其左侧紧挨位置。
|
||||||
*/
|
*/
|
||||||
@Mixin(AEBaseScreen.class)
|
@Mixin(value = AEBaseScreen.class, remap = false)
|
||||||
public abstract class PatternEncodingTermScreenMixin<T extends AEBaseMenu> {
|
public abstract class PatternEncodingTermScreenMixin<T extends AEBaseMenu> {
|
||||||
|
|
||||||
@Unique
|
@Unique
|
||||||
private IconButton eap$uploadBtn;
|
private IconButton eap$uploadBtn;
|
||||||
|
|
||||||
@Inject(method = "init", at = @At("TAIL"))
|
@Inject(method = "init", at = @At("TAIL"), remap = false)
|
||||||
private void eap$addUploadButton(CallbackInfo ci) {
|
private void eap$addUploadButton(CallbackInfo ci) {
|
||||||
// 仅在图样编码终端界面中添加按钮
|
// 仅在图样编码终端界面中添加按钮
|
||||||
if (!(((Object) this) instanceof PatternEncodingTermScreen)) {
|
if (!(((Object) this) instanceof PatternEncodingTermScreen)) {
|
||||||
|
|
@ -139,7 +139,7 @@ public abstract class PatternEncodingTermScreenMixin<T extends AEBaseMenu> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "containerTick", at = @At("TAIL"))
|
@Inject(method = "containerTick", at = @At("TAIL"), remap = false)
|
||||||
private void eap$ensureUploadButton(CallbackInfo ci) {
|
private void eap$ensureUploadButton(CallbackInfo ci) {
|
||||||
if (!(((Object) this) instanceof PatternEncodingTermScreen)) {
|
if (!(((Object) this) instanceof PatternEncodingTermScreen)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
* - 位于左侧工具栏
|
* - 位于左侧工具栏
|
||||||
* - 点击仅发送 C2S 切换请求;状态由 AE2 @GuiSync 回传决定
|
* - 点击仅发送 C2S 切换请求;状态由 AE2 @GuiSync 回传决定
|
||||||
*/
|
*/
|
||||||
@Mixin(PatternProviderScreen.class)
|
@Mixin(value = PatternProviderScreen.class, remap = false)
|
||||||
public abstract class PatternProviderScreenMixin<C extends PatternProviderMenu> extends AEBaseScreen<C> {
|
public abstract class PatternProviderScreenMixin<C extends PatternProviderMenu> extends AEBaseScreen<C> {
|
||||||
|
|
||||||
@Unique
|
@Unique
|
||||||
|
|
@ -47,7 +47,7 @@ public abstract class PatternProviderScreenMixin<C extends PatternProviderMenu>
|
||||||
super(menu, playerInventory, title, style);
|
super(menu, playerInventory, title, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "<init>", at = @At("RETURN"))
|
@Inject(method = "<init>", at = @At("RETURN"), remap = false)
|
||||||
private void eap$initAdvancedBlocking(C menu, Inventory playerInventory, Component title, ScreenStyle style, CallbackInfo ci) {
|
private void eap$initAdvancedBlocking(C menu, Inventory playerInventory, Component title, ScreenStyle style, CallbackInfo ci) {
|
||||||
// 使用 @GuiSync 初始化
|
// 使用 @GuiSync 初始化
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
"ae2.accessor.PatternProviderLogicAccessor",
|
"ae2.accessor.PatternProviderLogicAccessor",
|
||||||
"ae2.accessor.PatternProviderLogicPatternsAccessor",
|
"ae2.accessor.PatternProviderLogicPatternsAccessor",
|
||||||
"ae2.accessor.PatternProviderMenuAdvancedAccessor",
|
"ae2.accessor.PatternProviderMenuAdvancedAccessor",
|
||||||
"ae2.client.gui.PatternProviderScreenMixin",
|
|
||||||
"ae2.menu.PatternProviderMenuAdvancedMixin",
|
"ae2.menu.PatternProviderMenuAdvancedMixin",
|
||||||
"ae2.menu.PatternProviderMenuDoublingMixin",
|
"ae2.menu.PatternProviderMenuDoublingMixin",
|
||||||
"ae2.helpers.PatternProviderLogicAdvancedMixin",
|
"ae2.helpers.PatternProviderLogicAdvancedMixin",
|
||||||
|
|
@ -14,6 +13,7 @@
|
||||||
"ae2.AEProcessingPatternMixin",
|
"ae2.AEProcessingPatternMixin",
|
||||||
"ae2.autopattern.CraftingTreeNodeAccessor",
|
"ae2.autopattern.CraftingTreeNodeAccessor",
|
||||||
"ae2.autopattern.CraftingTreeProcessMixin",
|
"ae2.autopattern.CraftingTreeProcessMixin",
|
||||||
|
"ae2.accessor.PatternProviderLogicPatternInputsAccessor",
|
||||||
"extendedae.common.PartExPatternProviderMixin",
|
"extendedae.common.PartExPatternProviderMixin",
|
||||||
"extendedae.common.TileExPatternProviderMixin",
|
"extendedae.common.TileExPatternProviderMixin",
|
||||||
"extendedae.container.ContainerExPatternProviderMixin",
|
"extendedae.container.ContainerExPatternProviderMixin",
|
||||||
|
|
@ -24,10 +24,15 @@
|
||||||
"ae2.accessor.PatternEncodingTermMenuAccessor"
|
"ae2.accessor.PatternEncodingTermMenuAccessor"
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
|
"ae2.client.gui.AEBaseScreenMixin",
|
||||||
"ae2.client.gui.PatternEncodingTermScreenMixin",
|
"ae2.client.gui.PatternEncodingTermScreenMixin",
|
||||||
|
"ae2.client.gui.PatternProviderScreenMixin",
|
||||||
"ae2.accessor.AEBaseScreenAccessor",
|
"ae2.accessor.AEBaseScreenAccessor",
|
||||||
|
"ae2.accessor.MEStorageScreenAccessor",
|
||||||
"accessor.AbstractContainerScreenAccessor",
|
"accessor.AbstractContainerScreenAccessor",
|
||||||
"accessor.ScreenAccessor",
|
"accessor.ScreenAccessor",
|
||||||
|
"ae2.accessor.PatternAccessTermScreenAccessor",
|
||||||
|
"ae2.accessor.PatternAccessTermScreenSlotsRowAccessor",
|
||||||
"extendedae.accessor.GuiExPatternTerminalAccessor"
|
"extendedae.accessor.GuiExPatternTerminalAccessor"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user