mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 03:39:09 +00:00
Finish Inventory cleanup
This commit is contained in:
1 parent
db93c6e930
commit
344bb7514b
5 files changed
+83
-170
No files matched your search
@@ -10,24 +10,10 @@
|
||||
******************************************************************************/
|
||||
package forestry.energy.gadgets;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.fuels.EngineBronzeFuel;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.fluids.FluidHelper;
|
||||
@@ -41,8 +27,6 @@ import forestry.core.interfaces.ILiquidTankContainer;
|
||||
import forestry.core.inventory.TileInventoryAdapter;
|
||||
import forestry.core.network.GuiId;
|
||||
import forestry.core.network.PacketPayload;
|
||||
<<<<<<< HEAD
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
@@ -56,10 +40,6 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
=======
|
||||
import forestry.core.utils.TileInventoryAdapter;
|
||||
|
||||
>>>>>>> dev
|
||||
public class EngineBronze extends Engine implements ISidedInventory, ILiquidTankContainer {
|
||||
|
||||
/* CONSTANTS */
|
||||
|
||||
@@ -10,21 +10,10 @@
|
||||
******************************************************************************/
|
||||
package forestry.energy.gadgets;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.api.fuels.GeneratorFuel;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.fluids.FluidHelper;
|
||||
@@ -33,24 +22,22 @@ import forestry.core.fluids.tanks.FilteredTank;
|
||||
import forestry.core.gadgets.TileBase;
|
||||
import forestry.core.interfaces.ILiquidTankContainer;
|
||||
import forestry.core.interfaces.IRenderableMachine;
|
||||
<<<<<<< HEAD
|
||||
import forestry.core.inventory.TileInventoryAdapter;
|
||||
import forestry.core.network.EntityNetData;
|
||||
=======
|
||||
>>>>>>> dev
|
||||
import forestry.core.network.GuiId;
|
||||
import forestry.core.utils.EnumTankLevel;
|
||||
import forestry.core.utils.Utils;
|
||||
import forestry.plugins.PluginIC2;
|
||||
<<<<<<< HEAD
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
=======
|
||||
|
||||
import ic2.api.energy.prefab.BasicSource;
|
||||
>>>>>>> dev
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
public class MachineGenerator extends TileBase implements ISidedInventory, ILiquidTankContainer, IRenderableMachine {
|
||||
|
||||
@@ -187,6 +174,7 @@ public class MachineGenerator extends TileBase implements ISidedInventory, ILiqu
|
||||
}
|
||||
|
||||
/* SMP GUI */
|
||||
@Override
|
||||
public void getGUINetworkData(int i, int j) {
|
||||
int firstMessageId = tankManager.maxMessageId() + 1;
|
||||
if (i == firstMessageId)
|
||||
@@ -194,6 +182,7 @@ public class MachineGenerator extends TileBase implements ISidedInventory, ILiqu
|
||||
ic2EnergySource.setEnergyStored(j);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendGUINetworkData(Container container, ICrafting iCrafting) {
|
||||
int firstMessageId = tankManager.maxMessageId() + 1;
|
||||
if (ic2EnergySource != null)
|
||||
|
||||
@@ -13,7 +13,6 @@ package forestry.factory.gadgets;
|
||||
import buildcraft.api.statements.ITriggerExternal;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.ISpecialInventory;
|
||||
import forestry.api.recipes.ICentrifugeManager;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
@@ -22,7 +21,9 @@ import forestry.core.gadgets.TileBase;
|
||||
import forestry.core.gadgets.TilePowered;
|
||||
import forestry.core.network.GuiId;
|
||||
import forestry.core.inventory.InventoryAdapter;
|
||||
import forestry.core.inventory.TileInventoryAdapter;
|
||||
import forestry.core.utils.StackUtils;
|
||||
import forestry.core.utils.Utils;
|
||||
import forestry.factory.triggers.FactoryTriggers;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
@@ -42,7 +43,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Stack;
|
||||
|
||||
public class MachineCentrifuge extends TilePowered implements ISidedInventory, ISpecialInventory {
|
||||
public class MachineCentrifuge extends TilePowered implements ISidedInventory {
|
||||
|
||||
/* CONSTANTS */
|
||||
public static final int SLOT_RESOURCE = 0;
|
||||
@@ -50,6 +51,7 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
|
||||
/* RECIPE MANAGMENT */
|
||||
public static class Recipe {
|
||||
|
||||
public final int timePerItem;
|
||||
public final ItemStack resource;
|
||||
public final HashMap<ItemStack, Integer> products;
|
||||
@@ -76,6 +78,7 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
}
|
||||
|
||||
public static class RecipeManager implements ICentrifugeManager {
|
||||
|
||||
public static final ArrayList<MachineCentrifuge.Recipe> recipes = new ArrayList<MachineCentrifuge.Recipe>();
|
||||
|
||||
@Override
|
||||
@@ -134,7 +137,6 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
}
|
||||
|
||||
/* MEMBER */
|
||||
private final InventoryAdapter inventory = new InventoryAdapter(10, "Items");
|
||||
public MachineCentrifuge.Recipe currentRecipe;
|
||||
|
||||
private final Stack<ItemStack> pendingProducts = new Stack<ItemStack>();
|
||||
@@ -143,6 +145,7 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
|
||||
public MachineCentrifuge() {
|
||||
super(800, 40, Defaults.MACHINE_MAX_ENERGY);
|
||||
setInternalInventory(new TileInventoryAdapter(this, 10, "Items"));
|
||||
setHints(Config.hints.get("centrifuge"));
|
||||
}
|
||||
|
||||
@@ -164,17 +167,16 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
nbttagcompound.setInteger("ProductionTime", productionTime);
|
||||
nbttagcompound.setInteger("TimePerItem", timePerItem);
|
||||
|
||||
inventory.writeToNBT(nbttagcompound);
|
||||
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
ItemStack[] offspring = pendingProducts.toArray(new ItemStack[pendingProducts.size()]);
|
||||
for (int i = 0; i < offspring.length; i++)
|
||||
for (int i = 0; i < offspring.length; i++) {
|
||||
if (offspring[i] != null) {
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
nbttagcompound1.setByte("Slot", (byte) i);
|
||||
offspring[i].writeToNBT(nbttagcompound1);
|
||||
nbttaglist.appendTag(nbttagcompound1);
|
||||
}
|
||||
}
|
||||
nbttagcompound.setTag("PendingProducts", nbttaglist);
|
||||
}
|
||||
|
||||
@@ -185,8 +187,6 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
productionTime = nbttagcompound.getInteger("ProductionTime");
|
||||
timePerItem = nbttagcompound.getInteger("TimePerItem");
|
||||
|
||||
inventory.readFromNBT(nbttagcompound);
|
||||
|
||||
NBTTagList nbttaglist = nbttagcompound.getTagList("PendingProducts", 10);
|
||||
for (int i = 0; i < nbttaglist.tagCount(); i++) {
|
||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
|
||||
@@ -240,13 +240,14 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
}
|
||||
|
||||
// We are done, add products to queue
|
||||
for (Map.Entry<ItemStack, Integer> entry : currentRecipe.products.entrySet())
|
||||
for (Map.Entry<ItemStack, Integer> entry : currentRecipe.products.entrySet()) {
|
||||
if (entry.getValue() >= 100)
|
||||
pendingProducts.push(entry.getKey().copy());
|
||||
else if (worldObj.rand.nextInt(100) < entry.getValue())
|
||||
pendingProducts.push(entry.getKey().copy());
|
||||
}
|
||||
|
||||
inventory.decrStackSize(SLOT_RESOURCE, 1);
|
||||
getInternalInventory().decrStackSize(SLOT_RESOURCE, 1);
|
||||
checkRecipe();
|
||||
resetRecipe();
|
||||
|
||||
@@ -255,7 +256,7 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
}
|
||||
|
||||
public void checkRecipe() {
|
||||
Recipe sameRec = RecipeManager.findMatchingRecipe(inventory.getStackInSlot(SLOT_RESOURCE));
|
||||
Recipe sameRec = RecipeManager.findMatchingRecipe(getInternalInventory().getStackInSlot(SLOT_RESOURCE));
|
||||
|
||||
if (sameRec == null)
|
||||
setErrorState(EnumErrorCode.NORECIPE);
|
||||
@@ -292,7 +293,7 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
}
|
||||
|
||||
private boolean addProduct(ItemStack product, boolean all) {
|
||||
return inventory.tryAddStack(product, 1, getSizeInventory() - 1, all);
|
||||
return getInternalInventory().tryAddStack(product, 1, getSizeInventory() - 1, all);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -302,6 +303,7 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
|
||||
@Override
|
||||
public boolean hasResourcesMin(float percentage) {
|
||||
TileInventoryAdapter inventory = getInternalInventory();
|
||||
if (inventory.getStackInSlot(SLOT_RESOURCE) == null)
|
||||
return false;
|
||||
|
||||
@@ -338,134 +340,78 @@ public class MachineCentrifuge extends TilePowered implements ISidedInventory, I
|
||||
}
|
||||
|
||||
/* IINVENTORY */
|
||||
|
||||
@Override
|
||||
protected boolean canTakeStackFromSide(int slotIndex, ItemStack itemstack, int side) {
|
||||
|
||||
if(!super.canTakeStackFromSide(slotIndex, itemstack, side))
|
||||
return false;
|
||||
|
||||
if(slotIndex >= SLOT_PRODUCT_1 && slotIndex < SLOT_PRODUCT_1 + 9)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
public int getSizeInventory() {
|
||||
return getInternalInventory().getSizeInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canPutStackFromSide(int slotIndex, ItemStack itemstack, int side) {
|
||||
|
||||
if(!super.canPutStackFromSide(slotIndex, itemstack, side))
|
||||
return false;
|
||||
|
||||
if (slotIndex == SLOT_RESOURCE && RecipeManager.findMatchingRecipe(itemstack) != null)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return getInternalInventory().getStackInSlot(i);
|
||||
}
|
||||
|
||||
@Override public int getSizeInventory() { return inventory.getSizeInventory(); }
|
||||
@Override public ItemStack getStackInSlot(int i) { return inventory.getStackInSlot(i); }
|
||||
@Override public ItemStack decrStackSize(int i, int j) { return inventory.decrStackSize(i, j); }
|
||||
@Override public void setInventorySlotContents(int i, ItemStack itemstack) { inventory.setInventorySlotContents(i, itemstack); }
|
||||
@Override public ItemStack getStackInSlotOnClosing(int slot) { return inventory.getStackInSlotOnClosing(slot); }
|
||||
@Override public int getInventoryStackLimit() { return inventory.getInventoryStackLimit(); }
|
||||
@Override public void openInventory() {}
|
||||
@Override public void closeInventory() {}
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
return getInternalInventory().decrStackSize(i, j);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack) {
|
||||
getInternalInventory().setInventorySlotContents(i, itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int slot) {
|
||||
return getInternalInventory().getStackInSlotOnClosing(slot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return getInternalInventory().getInventoryStackLimit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: just a specialsource workaround
|
||||
*/
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
return super.isUseableByPlayer(player);
|
||||
return Utils.isUseableByPlayer(player, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: just a specialsource workaround
|
||||
*/
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return super.hasCustomInventoryName();
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: just a specialsource workaround
|
||||
*/
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slotIndex, ItemStack itemstack) {
|
||||
return super.isItemValidForSlot(slotIndex, itemstack);
|
||||
if (!getInternalInventory().isItemValidForSlot(slotIndex, itemstack))
|
||||
return false;
|
||||
return slotIndex == SLOT_RESOURCE && RecipeManager.findMatchingRecipe(itemstack) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: just a specialsource workaround
|
||||
*/
|
||||
/* ISIDEDINVENTORY */
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemstack, int j) {
|
||||
return super.canInsertItem(i, itemstack, j);
|
||||
public boolean canInsertItem(int slotIndex, ItemStack itemstack, int side) {
|
||||
return isItemValidForSlot(xCoord, itemstack);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: just a specialsource workaround
|
||||
*/
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemstack, int j) {
|
||||
return super.canExtractItem(i, itemstack, j);
|
||||
public boolean canExtractItem(int slotIndex, ItemStack itemstack, int side) {
|
||||
if (!getInternalInventory().canExtractItem(slotIndex, itemstack, side))
|
||||
return false;
|
||||
return slotIndex >= SLOT_PRODUCT_1 && slotIndex < SLOT_PRODUCT_1 + 9;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: just a specialsource workaround
|
||||
*/
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return super.getAccessibleSlotsFromSide(side);
|
||||
}
|
||||
|
||||
/* ISPECIALINVENTORY */
|
||||
@Override
|
||||
public ItemStack[] extractItem(boolean doRemove, ForgeDirection from, int maxItemCount) {
|
||||
|
||||
ItemStack product = null;
|
||||
|
||||
for (int i = SLOT_PRODUCT_1; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack stack = inventory.getStackInSlot(i);
|
||||
if (stack == null)
|
||||
continue;
|
||||
|
||||
product = StackUtils.createSplitStack(stack, 1);
|
||||
if (doRemove)
|
||||
decrStackSize(i, 1);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (product != null)
|
||||
return new ItemStack[] { product };
|
||||
else
|
||||
return new ItemStack[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addItem(ItemStack stack, boolean doAdd, ForgeDirection from) {
|
||||
ItemStack resource = inventory.getStackInSlot(SLOT_RESOURCE);
|
||||
if (resource == null) {
|
||||
if (doAdd)
|
||||
inventory.setInventorySlotContents(SLOT_RESOURCE, stack.copy());
|
||||
return stack.stackSize;
|
||||
}
|
||||
|
||||
if (!StackUtils.isIdenticalItem(resource, stack))
|
||||
return 0;
|
||||
|
||||
int space = resource.getMaxStackSize() - resource.stackSize;
|
||||
if (space <= 0)
|
||||
return 0;
|
||||
|
||||
if (doAdd)
|
||||
if (stack.stackSize <= space)
|
||||
resource.stackSize += stack.stackSize;
|
||||
else
|
||||
resource.stackSize += space;
|
||||
|
||||
return Math.min(stack.stackSize, space);
|
||||
return getInternalInventory().getAccessibleSlotsFromSide(side);
|
||||
}
|
||||
|
||||
/* ITRIGGERPROVIDER */
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.gadgets;
|
||||
|
||||
import forestry.core.EnumErrorCode;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.recipes.IFabricatorManager;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.core.fluids.TankManager;
|
||||
@@ -28,13 +29,16 @@ import forestry.core.inventory.wrappers.IInvSlot;
|
||||
import forestry.core.inventory.wrappers.InventoryIterator;
|
||||
import forestry.core.inventory.wrappers.InventoryMapper;
|
||||
import forestry.core.network.GuiId;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.ShapedRecipeCustom;
|
||||
import forestry.core.utils.StackUtils;
|
||||
import forestry.core.utils.Utils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
@@ -45,11 +49,6 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
|
||||
public class MachineFabricator extends TilePowered implements ICrafter, ILiquidTankContainer, ISidedInventory {
|
||||
|
||||
/* RECIPE MANAGMENT */
|
||||
@@ -229,14 +228,9 @@ public class MachineFabricator extends TilePowered implements ICrafter, ILiquidT
|
||||
|
||||
public MachineFabricator() {
|
||||
super(1100, 50, 3300);
|
||||
<<<<<<< HEAD
|
||||
setInternalInventory(new TileInventoryAdapter(this, 30, "Items"));
|
||||
invCrafting = new InventoryMapper(getInternalInventory(), SLOT_CRAFTING_1, SLOT_CRAFTING_COUNT);
|
||||
Fluid liquidGlass = FluidRegistry.getFluid(Defaults.LIQUID_GLASS);
|
||||
moltenTank = new FilteredTank(2 * Defaults.BUCKET_VOLUME, liquidGlass);
|
||||
=======
|
||||
moltenTank = new FilteredTank(2 * Defaults.BUCKET_VOLUME, Fluids.GLASS.get());
|
||||
>>>>>>> dev
|
||||
moltenTank.tankMode = StandardTank.TankMode.INTERNAL;
|
||||
tankManager = new TankManager(moltenTank);
|
||||
}
|
||||
@@ -471,6 +465,7 @@ public class MachineFabricator extends TilePowered implements ICrafter, ILiquidT
|
||||
}
|
||||
|
||||
/* SMP */
|
||||
@Override
|
||||
public void getGUINetworkData(int i, int j) {
|
||||
int messageId = tankManager.maxMessageId() + 1;
|
||||
|
||||
@@ -480,6 +475,7 @@ public class MachineFabricator extends TilePowered implements ICrafter, ILiquidT
|
||||
guiMeltingPoint = j;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendGUINetworkData(Container container, ICrafting iCrafting) {
|
||||
int messageId = tankManager.maxMessageId() + 1;
|
||||
iCrafting.sendProgressBarUpdate(container, messageId, heat);
|
||||
|
||||
@@ -294,6 +294,7 @@ public class MachineStill extends TilePowered implements ISidedInventory, ILiqui
|
||||
}
|
||||
|
||||
/* SMP GUI */
|
||||
@Override
|
||||
public void getGUINetworkData(int i, int j) {
|
||||
i -= tankManager.maxMessageId() + 1;
|
||||
switch (i) {
|
||||
@@ -306,6 +307,7 @@ public class MachineStill extends TilePowered implements ISidedInventory, ILiqui
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendGUINetworkData(Container container, ICrafting iCrafting) {
|
||||
int i = tankManager.maxMessageId() + 1;
|
||||
iCrafting.sendProgressBarUpdate(container, i, distillationTime);
|
||||
|
||||
Reference in new issue
Block a user