mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Move Config variables into their own class, (in api because other stuff in API references config, may make sense to move it back to common later), and move Blocks and Items into final variables in their own classes. It looks a lot cleaner this way and my OCD can finally rest now.
57 lines
1.2 KiB
Java
57 lines
1.2 KiB
Java
package mekanism.common.tile;
|
|
|
|
import java.util.Map;
|
|
|
|
import mekanism.api.MekanismConfig.usage;
|
|
import mekanism.api.gas.Gas;
|
|
import mekanism.api.gas.GasRegistry;
|
|
import mekanism.api.gas.GasStack;
|
|
import mekanism.common.block.BlockMachine.MachineType;
|
|
import mekanism.common.recipe.RecipeHandler.Recipe;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraftforge.oredict.OreDictionary;
|
|
|
|
public class TileEntityOsmiumCompressor extends TileEntityAdvancedElectricMachine
|
|
{
|
|
public TileEntityOsmiumCompressor()
|
|
{
|
|
super("Compressor.ogg", "OsmiumCompressor", usage.osmiumCompressorUsage, 1, 200, MachineType.OSMIUM_COMPRESSOR.baseEnergy);
|
|
}
|
|
|
|
@Override
|
|
public Map getRecipes()
|
|
{
|
|
return Recipe.OSMIUM_COMPRESSOR.get();
|
|
}
|
|
|
|
@Override
|
|
public GasStack getItemGas(ItemStack itemstack)
|
|
{
|
|
int amount = 0;
|
|
|
|
for(ItemStack ore : OreDictionary.getOres("ingotOsmium"))
|
|
{
|
|
if(ore.isItemEqual(itemstack))
|
|
{
|
|
return new GasStack(GasRegistry.getGas("liquidOsmium"), 200);
|
|
}
|
|
}
|
|
|
|
for(ItemStack ore : OreDictionary.getOres("blockOsmium"))
|
|
{
|
|
if(ore.isItemEqual(itemstack))
|
|
{
|
|
return new GasStack(GasRegistry.getGas("liquidOsmium"), 1800);
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public boolean isValidGas(Gas gas)
|
|
{
|
|
return false;
|
|
}
|
|
}
|