More minor fixes to the colors
This commit is contained in:
parent
9ccee1addc
commit
b53af54bac
2 changed files with 11 additions and 3 deletions
|
@ -242,4 +242,14 @@ public class ResourceGenerator
|
|||
{
|
||||
return materialNames.size() > id ? materialNames.get(id) : null;
|
||||
}
|
||||
|
||||
public static int getColor(String name)
|
||||
{
|
||||
if (name != null && materialColors.containsKey(name))
|
||||
{
|
||||
return materialColors.get(name);
|
||||
}
|
||||
return 0xFFFFFF;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,9 +21,7 @@ public class TileMaterial extends TileAdvanced implements IPacketReceiver
|
|||
|
||||
public int getColor()
|
||||
{
|
||||
if (name != null)
|
||||
return ResourceGenerator.materialColors.get(name);
|
||||
return 0xFFFFFF;
|
||||
return ResourceGenerator.getColor(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue