mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
implement tinted ore gasses, fix GuiGauge to render the tinted gas
This commit is contained in:
1 parent
2f8f71862c
commit
cbe9cdc3f2
8 files changed
+32
-10
No files matched your search
@@ -13,6 +13,8 @@ public class OreGas extends Gas
|
||||
super(s, "mekanism:blocks/liquid/Liquid" + (s.contains("clean") ? "Clean" : "") + "Ore");
|
||||
|
||||
oreName = name;
|
||||
|
||||
setTint(0xf2cd67);//default old tint
|
||||
}
|
||||
|
||||
public boolean isClean()
|
||||
|
||||
@@ -116,4 +116,15 @@ public class GuiGasGauge extends GuiGauge<Gas>
|
||||
{
|
||||
GasTank getTank();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderColor()
|
||||
{
|
||||
if(dummy)
|
||||
{
|
||||
return dummyType.getTint();
|
||||
}
|
||||
|
||||
return (infoHandler.getTank().getGas() != null) ? infoHandler.getTank().getGas().getGas().getTint() : super.getRenderColor();
|
||||
}
|
||||
}
|
||||
@@ -57,9 +57,16 @@ public class MekanismFluids
|
||||
for(Resource resource : Resource.values())
|
||||
{
|
||||
String name = resource.getName();
|
||||
String nameLower = name.toLowerCase();
|
||||
|
||||
OreGas clean = (OreGas)GasRegistry.register(new OreGas("clean" + name, "oregas." + name.toLowerCase()).setVisible(false));
|
||||
GasRegistry.register(new OreGas(name.toLowerCase(), "oregas." + name.toLowerCase()).setCleanGas(clean).setVisible(false));
|
||||
OreGas clean = new OreGas("clean" + name, "oregas." + nameLower);
|
||||
clean.setVisible(false).setTint(resource.tint);
|
||||
|
||||
OreGas dirty = new OreGas(nameLower, "oregas." + nameLower).setCleanGas(clean);
|
||||
dirty.setVisible(false).setTint(resource.tint);
|
||||
|
||||
GasRegistry.register(clean);
|
||||
GasRegistry.register(dirty);
|
||||
}
|
||||
|
||||
FluidRegistry.enableUniversalBucket();
|
||||
|
||||
@@ -2,19 +2,21 @@ package mekanism.common;
|
||||
|
||||
public enum Resource
|
||||
{
|
||||
IRON("Iron"),
|
||||
GOLD("Gold"),
|
||||
OSMIUM("Osmium"),
|
||||
COPPER("Copper"),
|
||||
TIN("Tin"),
|
||||
SILVER("Silver"),
|
||||
LEAD("Lead");
|
||||
IRON("Iron", 0xccccd9),
|
||||
GOLD("Gold", 0xf2cd67),
|
||||
OSMIUM("Osmium", 0x1e79c3),
|
||||
COPPER("Copper", 0xaa4b19),
|
||||
TIN("Tin", 0xccccd9),
|
||||
SILVER("Silver", 0xccccd9),
|
||||
LEAD("Lead", 0x3d3d41);
|
||||
|
||||
private String name;
|
||||
public final int tint;
|
||||
|
||||
Resource(String s)
|
||||
Resource(String s, int t)
|
||||
{
|
||||
name = s;
|
||||
tint = t;
|
||||
}
|
||||
|
||||
public static Resource getFromName(String s)
|
||||
|
||||
Reference in new issue
Block a user