mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 07:36:01 +00:00
v5.0.1 Beta #2
*Updated to MC v1.4.6. *Updated all APIs. *Repackaged for new Forge. *Added Metallurgic Infuser for making Steel and Bronze. *Added Refined Steel Dust. *Added Refined Steel Ingots. *Made Refined Iron -> Steel Block. *Maps instead of Vectors for recipes. *New recipe managing for Metallurgic Infuser. *Cleaned up imports. *Added new Javadocs. *Made Electrolytic Separator texture changed based on what gas it is outputting. *Other various bugfixes.
This commit is contained in:
1 parent
75e762fd35
commit
45b4510dc7
162 files changed
+1723
-826
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package mekanism.common;
|
||||
|
||||
import mekanism.api.EnumGas;
|
||||
import mekanism.api.IStorageTank;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotStorageTank extends Slot
|
||||
{
|
||||
public EnumGas type;
|
||||
public boolean acceptsAllGasses;
|
||||
|
||||
public SlotStorageTank(IInventory inventory, EnumGas gas, boolean all, int index, int x, int y)
|
||||
{
|
||||
super(inventory, index, x, y);
|
||||
type = gas;
|
||||
acceptsAllGasses = all;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack itemstack)
|
||||
{
|
||||
if(acceptsAllGasses)
|
||||
{
|
||||
return itemstack.getItem() instanceof IStorageTank;
|
||||
}
|
||||
|
||||
if(itemstack.getItem() instanceof IStorageTank)
|
||||
{
|
||||
return ((IStorageTank)itemstack.getItem()).getGasType(itemstack) == type || ((IStorageTank)itemstack.getItem()).getGasType(itemstack) == EnumGas.NONE;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user