Skip to content

Commit 8d2845c

Browse files
committed
修复流体合成样板无法自动上传到EF的问题
1 parent 487eff9 commit 8d2845c

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

src/main/java/github/kasuminova/novaeng/common/network/PktEFabricatorPatternSearchGUIAction.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ public PktEFabricatorPatternSearchGUIAction(final Action action, final BlockPos
3737

3838
@Override
3939
public void fromBytes(final ByteBuf buf) {
40-
action = Action.values()[buf.readByte()];
41-
if (action == Action.PICKUP_PATTERN) {
42-
pos = BlockPos.fromLong(buf.readLong());
43-
slot = buf.readByte();
40+
this.action = Action.values()[buf.readByte()];
41+
if (this.action == Action.PICKUP_PATTERN) {
42+
this.pos = BlockPos.fromLong(buf.readLong());
43+
this.slot = buf.readByte();
4444
}
4545
}
4646

4747
@Override
4848
public void toBytes(final ByteBuf buf) {
49-
buf.writeByte(action.ordinal());
50-
if (action == Action.PICKUP_PATTERN) {
51-
buf.writeLong(pos.toLong());
52-
buf.writeByte(slot);
49+
buf.writeByte(this.action.ordinal());
50+
if (this.action == Action.PICKUP_PATTERN) {
51+
buf.writeLong(this.pos.toLong());
52+
buf.writeByte(this.slot);
5353
}
5454
}
5555

src/main/java/github/kasuminova/novaeng/common/network/PktEFabricatorPatternSearchGUIUpdate.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ protected static void processPacket(final PktEFabricatorPatternSearchGUIUpdate m
4040

4141
@Override
4242
public void fromBytes(final ByteBuf buf) {
43-
type = UpdateType.values()[buf.readByte()];
44-
data = EFabricatorPatternData.readFrom(buf);
43+
this.type = UpdateType.values()[buf.readByte()];
44+
this.data = EFabricatorPatternData.readFrom(buf);
4545
}
4646

4747
@Override
4848
public void toBytes(final ByteBuf buf) {
49-
buf.writeByte(type.ordinal());
50-
data.writeTo(buf);
49+
buf.writeByte(this.type.ordinal());
50+
this.data.writeTo(buf);
5151
}
5252

5353
@Override

src/main/java/github/kasuminova/novaeng/common/network/PktPatternTermUploadPattern.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import appeng.api.storage.data.IAEItemStack
77
import appeng.container.implementations.ContainerPatternEncoder
88
import appeng.items.misc.ItemEncodedPattern
99
import appeng.me.GridAccessException
10-
import com.glodblock.github.util.FluidPatternDetails
10+
import com.glodblock.github.util.FluidCraftingPatternDetails
1111
import github.kasuminova.novaeng.common.tile.ecotech.efabricator.EFabricatorMEChannel
1212
import github.kasuminova.novaeng.mixin.ae2.AccessorContainerPatternEncoder
1313
import hellfirepvp.modularmachinery.ModularMachinery
@@ -44,7 +44,7 @@ class PktPatternTermUploadPattern : IMessage, IMessageHandler<PktPatternTermUplo
4444
val channelNodes = if (part != null) {
4545
try {
4646
part.proxy.grid.getMachines(EFabricatorMEChannel::class.java)
47-
} catch (ignored: GridAccessException) {
47+
} catch (_: GridAccessException) {
4848
return@addSyncTask
4949
}
5050
} else if (itemObject is IActionHost) {
@@ -58,7 +58,7 @@ class PktPatternTermUploadPattern : IMessage, IMessageHandler<PktPatternTermUplo
5858
val item = patternStack.item
5959
val out: IAEItemStack? = if (item is ItemEncodedPattern) {
6060
val pattern: ICraftingPatternDetails = item.getPatternForItem(patternStack, player.world)
61-
if (pattern.isCraftable || pattern is FluidPatternDetails) {
61+
if (pattern.isCraftable || pattern is FluidCraftingPatternDetails) {
6262
pattern.condensedOutputs[0]
6363
} else return@addSyncTask
6464
} else return@addSyncTask

src/main/java/github/kasuminova/novaeng/mixin/ae2/MixinGuiPatternTerm.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public MixinGuiPatternTerm() {
3535

3636
@Inject(method = "initGui", at = @At("RETURN"))
3737
private void injectInitGui(final CallbackInfo ci) {
38-
novaeng_core$uploadPatternButton = new GuiTabButton(
38+
this.novaeng_core$uploadPatternButton = new GuiTabButton(
3939
this.guiLeft + 173, this.guiTop + this.ySize - 155,
4040
new ItemStack(BlockEFabricatorController.L4), I18n.format("gui.efabricator.button.upload_pattern"), this.itemRender
4141
);
@@ -44,15 +44,15 @@ private void injectInitGui(final CallbackInfo ci) {
4444

4545
@Inject(method = "actionPerformed", at = @At("HEAD"), cancellable = true)
4646
private void injectActionPerformed(final GuiButton btn, final CallbackInfo ci) {
47-
if (btn == novaeng_core$uploadPatternButton) {
47+
if (btn == this.novaeng_core$uploadPatternButton) {
4848
NovaEngineeringCore.NET_CHANNEL.sendToServer(new PktPatternTermUploadPattern());
4949
ci.cancel();
5050
}
5151
}
5252

5353
@Inject(method = "drawFG", at = @At("HEAD"), remap = false)
5454
private void injectDrawFG(final int offsetX, final int offsetY, final int mouseX, final int mouseY, final CallbackInfo ci) {
55-
novaeng_core$uploadPatternButton.visible = this.container.isCraftingMode();
55+
this.novaeng_core$uploadPatternButton.visible = this.container.isCraftingMode();
5656
}
5757

5858
}

0 commit comments

Comments
 (0)