mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
more fixes
This commit is contained in:
1 parent
c1b2400549
commit
6edad9fae0
3 files changed
+24
-3
No files matched your search
+15
-1
@@ -169,7 +169,20 @@ public class WirelessPatternTerminalInventory extends MEMonitorHandler<IAEItemSt
|
||||
@Override
|
||||
public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removedStack,
|
||||
ItemStack newStack) {
|
||||
// NO-OP
|
||||
if (inv == this.crafting) {
|
||||
this.fixCraftingRecipes();
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
@@ -233,6 +246,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;
|
||||
@@ -74,11 +75,18 @@ public class CPacketPatternValueSet implements IMessage {
|
||||
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),
|
||||
new BlockPos(player.inventory.currentItem, 0, 0),
|
||||
Objects.requireNonNull(context.getSide()),
|
||||
message.originGui);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user