2015-08-29 14:33:25 +02:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("TheColoredLampColors.java") is part of the Actually Additions mod for Minecraft.
|
2015-08-29 14:33:25 +02:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-08-29 14:33:25 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2017-01-01 16:23:26 +01:00
|
|
|
* © 2015-2017 Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.blocks.metalists;
|
2015-06-28 21:28:58 +02:00
|
|
|
|
2016-11-21 16:23:48 +01:00
|
|
|
import net.minecraft.util.IStringSerializable;
|
|
|
|
|
2021-02-28 11:35:10 +01:00
|
|
|
@Deprecated
|
2019-05-02 09:10:29 +02:00
|
|
|
public enum TheColoredLampColors implements IStringSerializable {
|
2015-06-28 21:28:58 +02:00
|
|
|
|
2016-11-19 23:12:22 +01:00
|
|
|
WHITE("White", "white"),
|
|
|
|
ORANGE("Orange", "orange"),
|
|
|
|
MAGENTA("Magenta", "magenta"),
|
|
|
|
LIGHT_BLUE("LightBlue", "light_blue"),
|
|
|
|
YELLOW("Yellow", "yellow"),
|
|
|
|
LIME("Lime", "lime"),
|
|
|
|
PINK("Pink", "pink"),
|
|
|
|
GRAY("Gray", "gray"),
|
|
|
|
LIGHT_GRAY("LightGray", "light_gray"),
|
|
|
|
CYAN("Cyan", "cyan"),
|
|
|
|
PURPLE("Purple", "purple"),
|
|
|
|
BLUE("Blue", "blue"),
|
|
|
|
BROWN("Brown", "brown"),
|
|
|
|
GREEN("Green", "green"),
|
|
|
|
RED("Red", "red"),
|
|
|
|
BLACK("Black", "black");
|
2015-06-28 21:28:58 +02:00
|
|
|
|
2016-11-19 23:12:22 +01:00
|
|
|
public final String regName;
|
|
|
|
public final String oreName;
|
2015-06-28 21:28:58 +02:00
|
|
|
|
2019-05-02 09:10:29 +02:00
|
|
|
TheColoredLampColors(String oreName, String regName) {
|
2016-11-19 23:12:22 +01:00
|
|
|
this.oreName = oreName;
|
|
|
|
this.regName = regName;
|
2015-06-28 21:28:58 +02:00
|
|
|
}
|
|
|
|
|
2019-05-02 09:10:29 +02:00
|
|
|
public static TheColoredLampColors getColorFromDyeName(String color) {
|
|
|
|
if (color.substring(0, 3).equals("dye")) {
|
2015-06-29 20:55:06 +02:00
|
|
|
String actualName = color.substring(3);
|
2019-05-02 09:10:29 +02:00
|
|
|
for (int i = 0; i < values().length; i++) {
|
2016-11-19 23:12:22 +01:00
|
|
|
String aName = values()[i].oreName;
|
2019-05-02 09:10:29 +02:00
|
|
|
if (aName != null) {
|
2021-02-26 22:15:48 +01:00
|
|
|
if (aName.equalsIgnoreCase(actualName)) {
|
|
|
|
return values()[i];
|
|
|
|
}
|
2015-10-03 10:16:18 +02:00
|
|
|
}
|
2015-06-29 20:55:06 +02:00
|
|
|
}
|
2015-06-28 21:28:58 +02:00
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
2016-11-26 21:32:27 +01:00
|
|
|
|
|
|
|
@Override
|
2021-02-26 22:15:48 +01:00
|
|
|
public String getString() {
|
2016-11-26 21:32:27 +01:00
|
|
|
return this.regName;
|
|
|
|
}
|
2015-06-28 21:28:58 +02:00
|
|
|
}
|