mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
Merge pull request #95 from asdflj/master
fix can't be display in network details
This commit is contained in:
21 files changed
+412
-111
No files matched your search
@@ -19,6 +19,14 @@ public class ItemBiggerAppEngInventory extends BiggerAppEngInventory {
|
||||
this.readFromNBT(Platform.openNbtData(is), name);
|
||||
}
|
||||
|
||||
public void setCraftingMode(boolean mode) {
|
||||
Platform.openNbtData(is).setBoolean("craftingMode", mode);
|
||||
}
|
||||
|
||||
public boolean getCraftingMode(boolean mode) {
|
||||
return Platform.openNbtData(is).getBoolean("craftingMode");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
boolean isCraft = Platform.openNbtData(is).getBoolean("craftingMode");
|
||||
|
||||
@@ -27,6 +27,18 @@ import com.google.common.collect.ImmutableList;
|
||||
|
||||
public enum GuiType {
|
||||
|
||||
RENAMER(new PartOrItemGuiFactory<ITerminalHost>(ITerminalHost.class) {
|
||||
|
||||
@Override
|
||||
protected Object createServerGui(EntityPlayer player, ITerminalHost inv) {
|
||||
return new ContainerRenamer(player.inventory, inv);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object createClientGui(EntityPlayer player, ITerminalHost inv) {
|
||||
return new GuiRenamer(player.inventory, inv);
|
||||
}
|
||||
}),
|
||||
FLUID_AUTO_FILLER(new TileGuiFactory<TileFluidAutoFiller>(TileFluidAutoFiller.class) {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
package com.glodblock.github.inventory.item;
|
||||
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
public interface IWirelessInterfaceTerminal extends IWirelessTerminal {
|
||||
|
||||
void setClickedInterface(Util.DimensionalCoordSide tile);
|
||||
|
||||
Util.DimensionalCoordSide getClickedInterface();
|
||||
}
|
||||
+34
@@ -1,5 +1,7 @@
|
||||
package com.glodblock.github.inventory.item;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -10,6 +12,7 @@ import appeng.api.config.*;
|
||||
import appeng.api.implementations.items.IAEItemPowerStorage;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.util.AECableType;
|
||||
@@ -19,18 +22,38 @@ import appeng.tile.inventory.InvOperation;
|
||||
import appeng.util.ConfigManager;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
public class WirelessInterfaceTerminalInventory implements IWirelessInterfaceTerminal {
|
||||
|
||||
private final ItemStack target;
|
||||
private final IAEItemPowerStorage ips;
|
||||
private final int inventorySlot;
|
||||
private final IGridNode grid;
|
||||
private Util.DimensionalCoordSide tile;
|
||||
|
||||
public WirelessInterfaceTerminalInventory(ItemStack is, int slot, IGridNode gridNode, EntityPlayer player) {
|
||||
Objects.requireNonNull(Util.getWirelessInv(is, player, StorageChannel.ITEMS));
|
||||
this.ips = (ToolWirelessTerminal) is.getItem();
|
||||
this.grid = gridNode;
|
||||
this.target = is;
|
||||
this.inventorySlot = slot;
|
||||
readFromNBT();
|
||||
}
|
||||
|
||||
public void readFromNBT() {
|
||||
NBTTagCompound data = Platform.openNbtData(this.target);
|
||||
if (data.hasKey("clickedInterface")) {
|
||||
NBTTagCompound tileMsg = (NBTTagCompound) data.getTag("clickedInterface");
|
||||
this.tile = Util.DimensionalCoordSide.readFromNBT(tileMsg);
|
||||
}
|
||||
}
|
||||
|
||||
public void writeToNBT() {
|
||||
NBTTagCompound data = Platform.openNbtData(this.target);
|
||||
NBTTagCompound tileMsg = new NBTTagCompound();
|
||||
tile.writeToNBT(tileMsg);
|
||||
data.setTag("clickedInterface", tileMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -108,4 +131,15 @@ public class WirelessInterfaceTerminalInventory implements IWirelessInterfaceTer
|
||||
ItemStack newStack) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setClickedInterface(Util.DimensionalCoordSide tile) {
|
||||
this.tile = tile;
|
||||
this.writeToNBT();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Util.DimensionalCoordSide getClickedInterface() {
|
||||
return this.tile;
|
||||
}
|
||||
}
|
||||
+2
@@ -326,6 +326,8 @@ public class WirelessPatternTerminalExInventory extends MEMonitorHandler<IAEItem
|
||||
public void setCraftingRecipe(boolean craftingMode) {
|
||||
this.craftingMode = craftingMode;
|
||||
this.fixCraftingRecipes();
|
||||
// force update crafting mode
|
||||
((ItemBiggerAppEngInventory) this.crafting).setCraftingMode(craftingMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
@@ -298,6 +298,8 @@ public class WirelessPatternTerminalInventory extends MEMonitorHandler<IAEItemSt
|
||||
public void setCraftingRecipe(boolean craftingMode) {
|
||||
this.craftingMode = craftingMode;
|
||||
this.fixCraftingRecipes();
|
||||
// force update crafting mode
|
||||
((ItemBiggerAppEngInventory) this.crafting).setCraftingMode(craftingMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user