mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
Merge remote-tracking branch 'origin/wireless' into wireless
This commit is contained in:
commit
ba45bd5606
3 files changed
+39
-10
No files matched your search
@@ -19,6 +19,15 @@ public class ItemBiggerAppEngInventory extends BiggerAppEngInventory {
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
boolean isCraft = Platform.openNbtData(is).getBoolean("craftingMode");
|
||||
if (isCraft) {
|
||||
for (int x = 0; x < this.getSizeInventory(); x++) {
|
||||
final ItemStack is = this.getStackInSlot(x);
|
||||
if (is != null) {
|
||||
is.stackSize = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.writeToNBT(Platform.openNbtData(is), this.name);
|
||||
}
|
||||
|
||||
|
||||
+12
@@ -172,6 +172,17 @@ public class WirelessPatternTerminalInventory extends MEMonitorHandler<IAEItemSt
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
private void fixCraftingRecipes() {
|
||||
if (this.craftingMode) {
|
||||
for (int x = 0; x < this.crafting.getSizeInventory(); x++) {
|
||||
final ItemStack is = this.crafting.getStackInSlot(x);
|
||||
if (is != null) {
|
||||
is.stackSize = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInverted() {
|
||||
return this.inverted;
|
||||
@@ -233,6 +244,7 @@ public class WirelessPatternTerminalInventory extends MEMonitorHandler<IAEItemSt
|
||||
@Override
|
||||
public void setCraftingRecipe(boolean craftingMode) {
|
||||
this.craftingMode = craftingMode;
|
||||
this.fixCraftingRecipes();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.glodblock.github.network;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.glodblock.github.inventory.gui.PartOrItemGuiFactory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -69,18 +70,25 @@ public class CPacketPatternValueSet implements IMessage {
|
||||
final TileEntity te = context.getTile();
|
||||
if (te != null) {
|
||||
InventoryHandler.openGui(
|
||||
player,
|
||||
player.worldObj,
|
||||
new BlockPos(te),
|
||||
Objects.requireNonNull(context.getSide()),
|
||||
message.originGui);
|
||||
player,
|
||||
player.worldObj,
|
||||
new BlockPos(te),
|
||||
Objects.requireNonNull(context.getSide()),
|
||||
message.originGui);
|
||||
} else if (message.originGui.guiFactory instanceof PartOrItemGuiFactory) {
|
||||
InventoryHandler.openGui(
|
||||
player,
|
||||
player.worldObj,
|
||||
new BlockPos(player.inventory.currentItem, Util.GuiHelper.encodeType(0, Util.GuiHelper.GuiType.ITEM), 0),
|
||||
Objects.requireNonNull(context.getSide()),
|
||||
message.originGui);
|
||||
} else {
|
||||
InventoryHandler.openGui(
|
||||
player,
|
||||
player.worldObj,
|
||||
new BlockPos(player.inventory.currentItem, 0, 0),
|
||||
Objects.requireNonNull(context.getSide()),
|
||||
message.originGui);
|
||||
player,
|
||||
player.worldObj,
|
||||
new BlockPos(player.inventory.currentItem, 0, 0),
|
||||
Objects.requireNonNull(context.getSide()),
|
||||
message.originGui);
|
||||
}
|
||||
if (player.openContainer instanceof FCContainerEncodeTerminal) {
|
||||
Slot slot = player.openContainer.getSlot(message.valueIndex);
|
||||
|
||||
Reference in new issue
Block a user