mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-19 19:49:50 +00:00
Fixed Portable Tank transfer issue, fixed inventories not being sustained, fixed Logistical Transporter crash
This commit is contained in:
1 parent
896dd4de3f
commit
369eb012af
4 files changed
+18
-4
No files matched your search
@@ -750,7 +750,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
|
||||
itemStack.stackTagCompound.setTag("Items", nbtTags);
|
||||
}
|
||||
}
|
||||
@@ -767,7 +767,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
return null;
|
||||
}
|
||||
|
||||
return itemStack.stackTagCompound.getTagList("Items", NBT.TAG_ANY_NUMERIC);
|
||||
return itemStack.stackTagCompound.getTagList("Items", NBT.TAG_COMPOUND);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mekanism.common.tile;
|
||||
|
||||
import mekanism.common.ISustainedInventory;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.util.InventoryUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
@@ -544,13 +544,26 @@ public class TileEntityPortableTank extends TileEntityContainerBlock implements
|
||||
}
|
||||
}
|
||||
|
||||
return (from == ForgeDirection.UP || from == ForgeDirection.DOWN) && (fluidTank.getFluid() == null || fluidTank.getFluid().getFluid() == fluid);
|
||||
return fluidTank.getFluid() == null || fluidTank.getFluid().getFluid() == fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid)
|
||||
{
|
||||
return !isActive && from == ForgeDirection.DOWN && (fluid == null || (fluidTank != null && fluidTank.getFluid().getFluid() == fluid));
|
||||
if(fluidTank != null)
|
||||
{
|
||||
if(fluid == null || fluidTank.getFluid().getFluid() == fluid)
|
||||
{
|
||||
if(isActive)
|
||||
{
|
||||
return from != ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package powercrystals.minefactoryreloaded.api;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IDeepStorageUnit
|
||||
{
|
||||
/**
|
||||
* @return A populated ItemStack with stackSize for the full amount of materials in the DSU.
|
||||
* May have a stackSize > getMaxStackSize(). May have a stackSize of 0 (indicating locked contents).
|
||||
*/
|
||||
ItemStack getStoredItemType();
|
||||
|
||||
/**
|
||||
* Sets the total amount of the item currently being stored, or zero if all items are to be removed.
|
||||
*/
|
||||
void setStoredItemCount(int amount);
|
||||
|
||||
/**
|
||||
* Sets the type of the stored item and initializes the number of stored items to amount.
|
||||
* Will overwrite any existing stored items.
|
||||
*/
|
||||
void setStoredItemType(ItemStack type, int amount);
|
||||
|
||||
/**
|
||||
* @return The maximum number of items the DSU can hold.
|
||||
* May change based on the current type stored.
|
||||
*/
|
||||
int getMaxStoredCount();
|
||||
}
|
||||
Reference in new issue
Block a user