Ore gasses! For use in T4 (5x) ore processing.
This commit is contained in:
parent
7c5fe23833
commit
0a0e329223
11 changed files with 113 additions and 76 deletions
|
@ -1,20 +1,20 @@
|
|||
package mekanism.api.gas;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class OreGas extends Gas
|
||||
{
|
||||
public ItemStack oreStack;
|
||||
private String oreName;
|
||||
|
||||
public OreGas(String s, ItemStack stack)
|
||||
public OreGas(String s, String name)
|
||||
{
|
||||
super(s);
|
||||
|
||||
oreStack = stack;
|
||||
oreName = name;
|
||||
}
|
||||
|
||||
public String getOreName()
|
||||
{
|
||||
return oreStack.getDisplayName();
|
||||
return StatCollector.translateToLocal(oreName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,12 +4,13 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.OreGas;
|
||||
import mekanism.common.ISpecialBounds;
|
||||
import mekanism.common.ObfuscatedNames;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFluid;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
|
@ -76,6 +77,14 @@ public class MekanismRenderer
|
|||
GasRegistry.getGas("hydrogenChloride").setIcon(event.map.registerIcon("mekanism:LiquidHydrogenChloride"));
|
||||
GasRegistry.getGas("liquidOsmium").setIcon(event.map.registerIcon("mekanism:LiquidOsmium"));
|
||||
GasRegistry.getGas("liquidStone").setIcon(event.map.registerIcon("mekanism:LiquidStone"));
|
||||
|
||||
for(Gas gas : GasRegistry.getRegisteredGasses())
|
||||
{
|
||||
if(gas instanceof OreGas)
|
||||
{
|
||||
gas.setIcon(event.map.registerIcon("mekanism:LiquidOre"));
|
||||
}
|
||||
}
|
||||
|
||||
FluidRegistry.getFluid("brine").setIcons(event.map.registerIcon("mekanism:LiquidBrine"));
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ import mekanism.api.gas.Gas;
|
|||
import mekanism.api.gas.GasNetwork.GasTransferEvent;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.OreGas;
|
||||
import mekanism.api.infuse.InfuseObject;
|
||||
import mekanism.api.infuse.InfuseRegistry;
|
||||
import mekanism.api.infuse.InfuseType;
|
||||
|
@ -839,6 +840,9 @@ public class Mekanism
|
|||
OreDictionary.registerOre("battery", EnergyTablet.getUnchargedItem());
|
||||
OreDictionary.registerOre("pulpWood", Sawdust);
|
||||
|
||||
//for RailCraft/IC2.
|
||||
OreDictionary.registerOre("dustObsidian", new ItemStack(DirtyDust, 1, 6));
|
||||
|
||||
//GregoriousT?
|
||||
OreDictionary.registerOre("itemSalt", Salt);
|
||||
OreDictionary.registerOre("dustSalt", Salt);
|
||||
|
@ -872,44 +876,13 @@ public class Mekanism
|
|||
OreDictionary.registerOre("blockCopper", new ItemStack(BasicBlock, 1, 12));
|
||||
OreDictionary.registerOre("blockTin", new ItemStack(BasicBlock, 1, 13));
|
||||
|
||||
OreDictionary.registerOre("dustDirtyIron", new ItemStack(DirtyDust, 1, 0));
|
||||
OreDictionary.registerOre("dustDirtyGold", new ItemStack(DirtyDust, 1, 1));
|
||||
OreDictionary.registerOre("dustDirtyOsmium", new ItemStack(DirtyDust, 1, 2));
|
||||
OreDictionary.registerOre("dustDirtyCopper", new ItemStack(DirtyDust, 1, 3));
|
||||
OreDictionary.registerOre("dustDirtyTin", new ItemStack(DirtyDust, 1, 4));
|
||||
OreDictionary.registerOre("dustDirtySilver", new ItemStack(DirtyDust, 1, 5));
|
||||
OreDictionary.registerOre("dustDirtyObsidian", new ItemStack(DirtyDust, 1, 6));
|
||||
OreDictionary.registerOre("dustDirtyLead", new ItemStack(DirtyDust, 1, 7));
|
||||
|
||||
//for RailCraft/IC2.
|
||||
OreDictionary.registerOre("dustObsidian", new ItemStack(DirtyDust, 1, 6));
|
||||
|
||||
OreDictionary.registerOre("clumpIron", new ItemStack(Clump, 1, 0));
|
||||
OreDictionary.registerOre("clumpGold", new ItemStack(Clump, 1, 1));
|
||||
OreDictionary.registerOre("clumpOsmium", new ItemStack(Clump, 1, 2));
|
||||
OreDictionary.registerOre("clumpCopper", new ItemStack(Clump, 1, 3));
|
||||
OreDictionary.registerOre("clumpTin", new ItemStack(Clump, 1, 4));
|
||||
OreDictionary.registerOre("clumpSilver", new ItemStack(Clump, 1, 5));
|
||||
OreDictionary.registerOre("clumpObsidian", new ItemStack(Clump, 1, 6));
|
||||
OreDictionary.registerOre("clumpLead", new ItemStack(Clump, 1, 7));
|
||||
|
||||
OreDictionary.registerOre("shardIron", new ItemStack(Shard, 1, 0));
|
||||
OreDictionary.registerOre("shardGold", new ItemStack(Shard, 1, 1));
|
||||
OreDictionary.registerOre("shardOsmium", new ItemStack(Shard, 1, 2));
|
||||
OreDictionary.registerOre("shardCopper", new ItemStack(Shard, 1, 3));
|
||||
OreDictionary.registerOre("shardTin", new ItemStack(Shard, 1, 4));
|
||||
OreDictionary.registerOre("shardSilver", new ItemStack(Shard, 1, 5));
|
||||
OreDictionary.registerOre("shardObsidian", new ItemStack(Shard, 1, 6));
|
||||
OreDictionary.registerOre("shardLead", new ItemStack(Shard, 1, 7));
|
||||
|
||||
OreDictionary.registerOre("crystalIron", new ItemStack(Crystal, 1, 0));
|
||||
OreDictionary.registerOre("crystalGold", new ItemStack(Crystal, 1, 1));
|
||||
OreDictionary.registerOre("crystalOsmium", new ItemStack(Crystal, 1, 2));
|
||||
OreDictionary.registerOre("crystalCopper", new ItemStack(Crystal, 1, 3));
|
||||
OreDictionary.registerOre("crystalTin", new ItemStack(Crystal, 1, 4));
|
||||
OreDictionary.registerOre("crystalSilver", new ItemStack(Crystal, 1, 5));
|
||||
OreDictionary.registerOre("crystalObsidian", new ItemStack(Crystal, 1, 6));
|
||||
OreDictionary.registerOre("crystalLead", new ItemStack(Crystal, 1, 7));
|
||||
for(Resource resource : Resource.values())
|
||||
{
|
||||
OreDictionary.registerOre("dustDirty" + resource.getName(), new ItemStack(DirtyDust, 1, resource.ordinal()));
|
||||
OreDictionary.registerOre("clump" + resource.getName(), new ItemStack(Clump, 1, resource.ordinal()));
|
||||
OreDictionary.registerOre("shard" + resource.getName(), new ItemStack(Shard, 1, resource.ordinal()));
|
||||
OreDictionary.registerOre("crystal" + resource.getName(), new ItemStack(Crystal, 1, resource.ordinal()));
|
||||
}
|
||||
|
||||
OreDictionary.registerOre("oreOsmium", new ItemStack(OreBlock, 1, 0));
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(OreBlock, 1, 1));
|
||||
|
@ -1090,6 +1063,14 @@ public class Mekanism
|
|||
GasRegistry.register(new Gas("hydrogenChloride")).registerFluid();
|
||||
GasRegistry.register(new Gas("liquidOsmium").setVisible(false));
|
||||
GasRegistry.register(new Gas("liquidStone").setVisible(false));
|
||||
|
||||
for(Resource resource : Resource.values())
|
||||
{
|
||||
String name = resource.getName();
|
||||
|
||||
GasRegistry.register(new OreGas(name.toLowerCase(), "oregas." + name.toLowerCase()).setVisible(false));
|
||||
GasRegistry.register(new OreGas("clean" + name, "oregas." + name.toLowerCase()).setVisible(false));
|
||||
}
|
||||
|
||||
FluidRegistry.registerFluid(new Fluid("brine"));
|
||||
|
||||
|
|
25
common/mekanism/common/Resource.java
Normal file
25
common/mekanism/common/Resource.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
package mekanism.common;
|
||||
|
||||
public enum Resource
|
||||
{
|
||||
IRON("Iron"),
|
||||
GOLD("Gold"),
|
||||
OSMIUM("Osmium"),
|
||||
COPPER("Copper"),
|
||||
TIN("Tin"),
|
||||
SILVER("Silver"),
|
||||
OBSIDIAN("Obsidian"),
|
||||
LEAD("Lead");
|
||||
|
||||
private String name;
|
||||
|
||||
private Resource(String s)
|
||||
{
|
||||
name = s;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package mekanism.common.item;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.Resource;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,10 +13,6 @@ public class ItemClump extends ItemMekanism
|
|||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
|
||||
public static String[] en_USNames = {"Iron", "Gold", "Osmium",
|
||||
"Copper", "Tin", "Silver",
|
||||
"Obsidian", "Lead"};
|
||||
|
||||
public ItemClump(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -26,9 +23,9 @@ public class ItemClump extends ItemMekanism
|
|||
@Override
|
||||
public void registerIcons(IconRegister register)
|
||||
{
|
||||
for(int i = 0; i <= 7; i++)
|
||||
for(int i = 0; i < Resource.values().length; i++)
|
||||
{
|
||||
icons[i] = register.registerIcon("mekanism:" + en_USNames[i] + "Clump");
|
||||
icons[i] = register.registerIcon("mekanism:" + Resource.values()[i].getName() + "Clump");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +38,7 @@ public class ItemClump extends ItemMekanism
|
|||
@Override
|
||||
public void getSubItems(int id, CreativeTabs tabs, List itemList)
|
||||
{
|
||||
for(int counter = 0; counter <= 7; ++counter)
|
||||
for(int counter = 0; counter < Resource.values().length; counter++)
|
||||
{
|
||||
itemList.add(new ItemStack(this, 1, counter));
|
||||
}
|
||||
|
@ -50,6 +47,6 @@ public class ItemClump extends ItemMekanism
|
|||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
{
|
||||
return "item." + en_USNames[item.getItemDamage()].toLowerCase() + "Clump";
|
||||
return "item." + Resource.values()[item.getItemDamage()].getName().toLowerCase() + "Clump";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package mekanism.common.item;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.Resource;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,10 +13,6 @@ public class ItemCrystal extends ItemMekanism
|
|||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
|
||||
public static String[] en_USNames = {"Iron", "Gold", "Osmium",
|
||||
"Copper", "Tin", "Silver",
|
||||
"Obsidian", "Lead"};
|
||||
|
||||
public ItemCrystal(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -26,9 +23,9 @@ public class ItemCrystal extends ItemMekanism
|
|||
@Override
|
||||
public void registerIcons(IconRegister register)
|
||||
{
|
||||
for(int i = 0; i <= 7; i++)
|
||||
for(int i = 0; i < Resource.values().length; i++)
|
||||
{
|
||||
icons[i] = register.registerIcon("mekanism:" + en_USNames[i] + "Crystal");
|
||||
icons[i] = register.registerIcon("mekanism:" + Resource.values()[i].getName() + "Crystal");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +38,7 @@ public class ItemCrystal extends ItemMekanism
|
|||
@Override
|
||||
public void getSubItems(int id, CreativeTabs tabs, List itemList)
|
||||
{
|
||||
for(int counter = 0; counter <= 7; ++counter)
|
||||
for(int counter = 0; counter < Resource.values().length; counter++)
|
||||
{
|
||||
itemList.add(new ItemStack(this, 1, counter));
|
||||
}
|
||||
|
@ -50,6 +47,6 @@ public class ItemCrystal extends ItemMekanism
|
|||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
{
|
||||
return "item." + en_USNames[item.getItemDamage()].toLowerCase() + "Crystal";
|
||||
return "item." + Resource.values()[item.getItemDamage()].getName().toLowerCase() + "Crystal";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package mekanism.common.item;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.Resource;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,10 +13,6 @@ public class ItemDirtyDust extends ItemMekanism
|
|||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
|
||||
public static String[] en_USNames = {"Iron", "Gold", "Osmium",
|
||||
"Copper", "Tin", "Silver",
|
||||
"Obsidian", "Lead"};
|
||||
|
||||
public ItemDirtyDust(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -26,9 +23,9 @@ public class ItemDirtyDust extends ItemMekanism
|
|||
@Override
|
||||
public void registerIcons(IconRegister register)
|
||||
{
|
||||
for(int i = 0; i <= 7; i++)
|
||||
for(int i = 0; i < Resource.values().length; i++)
|
||||
{
|
||||
icons[i] = register.registerIcon("mekanism:Dirty" + en_USNames[i] + "Dust");
|
||||
icons[i] = register.registerIcon("mekanism:Dirty" + Resource.values()[i].getName() + "Dust");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +38,7 @@ public class ItemDirtyDust extends ItemMekanism
|
|||
@Override
|
||||
public void getSubItems(int id, CreativeTabs tabs, List itemList)
|
||||
{
|
||||
for (int counter = 0; counter <= 7; ++counter)
|
||||
for(int counter = 0; counter < Resource.values().length; counter++)
|
||||
{
|
||||
itemList.add(new ItemStack(this, 1, counter));
|
||||
}
|
||||
|
@ -50,6 +47,6 @@ public class ItemDirtyDust extends ItemMekanism
|
|||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
{
|
||||
return "item.dirty" + en_USNames[item.getItemDamage()] + "Dust";
|
||||
return "item.dirty" + Resource.values()[item.getItemDamage()].getName() + "Dust";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package mekanism.common.item;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.Resource;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,10 +13,6 @@ public class ItemShard extends ItemMekanism
|
|||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
|
||||
public static String[] en_USNames = {"Iron", "Gold", "Osmium",
|
||||
"Copper", "Tin", "Silver",
|
||||
"Obsidian", "Lead"};
|
||||
|
||||
public ItemShard(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -26,9 +23,9 @@ public class ItemShard extends ItemMekanism
|
|||
@Override
|
||||
public void registerIcons(IconRegister register)
|
||||
{
|
||||
for(int i = 0; i <= 7; i++)
|
||||
for(int i = 0; i < Resource.values().length; i++)
|
||||
{
|
||||
icons[i] = register.registerIcon("mekanism:" + en_USNames[i] + "Shard");
|
||||
icons[i] = register.registerIcon("mekanism:" + Resource.values()[i].getName() + "Shard");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +38,7 @@ public class ItemShard extends ItemMekanism
|
|||
@Override
|
||||
public void getSubItems(int id, CreativeTabs tabs, List itemList)
|
||||
{
|
||||
for(int counter = 0; counter <= 7; ++counter)
|
||||
for(int counter = 0; counter < Resource.values().length; counter++)
|
||||
{
|
||||
itemList.add(new ItemStack(this, 1, counter));
|
||||
}
|
||||
|
@ -50,6 +47,6 @@ public class ItemShard extends ItemMekanism
|
|||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
{
|
||||
return "item." + en_USNames[item.getItemDamage()].toLowerCase() + "Shard";
|
||||
return "item." + Resource.values()[item.getItemDamage()].getName().toLowerCase() + "Shard";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,6 +188,24 @@ gas.hydrogenChloride=Hydrogen Chloride
|
|||
gas.liquidOsmium=Liquid Osmium
|
||||
gas.liquidStone=Liquid Stone
|
||||
|
||||
gas.iron=Iron Slurry
|
||||
gas.gold=Gold Slurry
|
||||
gas.osmium=Osmium Slurry
|
||||
gas.copper=Copper Slurry
|
||||
gas.tin=Tin Slurry
|
||||
gas.silver=Silver Slurry
|
||||
gas.obsidian=Obsidian Slurry
|
||||
gas.lead=Lead Slurry
|
||||
|
||||
gas.cleanIron=Iron Slurry
|
||||
gas.cleanGold=Gold Slurry
|
||||
gas.cleanOsmium=Osmium Slurry
|
||||
gas.cleanCopper=Copper Slurry
|
||||
gas.cleanTin=Tin Slurry
|
||||
gas.cleanSilver=Silver Slurry
|
||||
gas.cleanObsidian=Obsidian Slurry
|
||||
gas.cleanLead=Lead Slurry
|
||||
|
||||
//Fluids
|
||||
fluid.hydrogen=Liquid Hydrogen
|
||||
fluid.oxygen=Liquid Oxygen
|
||||
|
@ -198,6 +216,17 @@ fluid.sulfuricAcid=Liquid Sulfuric Acid
|
|||
fluid.hydrogenChloride=Liquid Hydrogen Chloride
|
||||
fluid.brine=Brine
|
||||
|
||||
//OreGas names
|
||||
oregas.iron=Iron Ore
|
||||
oregas.gold=Gold Ore
|
||||
oregas.osmium=Osmium Ore
|
||||
oregas.copper=Copper Ore
|
||||
oregas.tin=Tin Ore
|
||||
oregas.silver=Silver Ore
|
||||
oregas.obsidian=Obsidian Ore
|
||||
oregas.lead=Lead Ore
|
||||
|
||||
|
||||
//Gui text
|
||||
gui.removeSpeedUpgrade=Remove speed upgrade
|
||||
gui.removeEnergyUpgrade=Remove energy upgrade
|
||||
|
|
BIN
resources/assets/mekanism/textures/blocks/LiquidOre.png
Normal file
BIN
resources/assets/mekanism/textures/blocks/LiquidOre.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"animation": {
|
||||
"frametime": 2
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue