Merge branch '1.8' of https://github.com/aidancbrady/Mekanism into 1.8
This commit is contained in:
commit
8f6cf7e1c9
3 changed files with 62 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
|||
package mekanism.common.teleportation;
|
||||
|
||||
import mekanism.api.gas.GasTank;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
public class SharedInventory
|
||||
{
|
||||
public String name;
|
||||
|
||||
public double storedEnergy;
|
||||
public FluidTank storedFluid;
|
||||
public GasTank storedGas;
|
||||
public ItemStack storedItem;
|
||||
|
||||
public SharedInventory(String freq)
|
||||
{
|
||||
name = freq;
|
||||
|
||||
storedEnergy = 0;
|
||||
storedFluid = new FluidTank(1000);
|
||||
storedGas = new GasTank(1000);
|
||||
storedItem = null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package mekanism.common.teleportation;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class SharedInventoryManager
|
||||
{
|
||||
public static HashMap<String, SharedInventory> inventories = new HashMap<String, SharedInventory>();
|
||||
|
||||
public static SharedInventory getInventory(String frequency)
|
||||
{
|
||||
if(frequency.length() <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
SharedInventory inv = inventories.get(frequency);
|
||||
|
||||
if(inv == null)
|
||||
{
|
||||
inv = new SharedInventory(frequency);
|
||||
|
||||
inventories.put(frequency, inv);
|
||||
}
|
||||
|
||||
return inv;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package mekanism.common.tile;
|
||||
|
||||
public class TileEntityEntangledInventory extends TileEntityElectricBlock
|
||||
{
|
||||
public TileEntityEntangledInventory()
|
||||
{
|
||||
super("Entangled", 0);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue