diff --git a/src/main/java/anvil/infinity/config/ConfigHandler.java b/src/main/java/anvil/infinity/config/ConfigHandler.java index 2c1419d..0a5ed3d 100644 --- a/src/main/java/anvil/infinity/config/ConfigHandler.java +++ b/src/main/java/anvil/infinity/config/ConfigHandler.java @@ -17,6 +17,19 @@ public class ConfigHandler { public static int powerCooldown; public static boolean stAbilities; + public static int powerStoneColor; + public static int powerStoneShine; + public static int realityStoneColor; + public static int realityStoneShine; + public static int timeStoneColor; + public static int timeStoneShine; + public static int mindStoneColor; + public static int mindStoneShine; + public static int soulStoneColor; + public static int soulStoneShine; + public static int spaceStoneColor; + public static int spaceStoneShine; + public static void refreshConfig(File file) { config = new Configuration(file); config.load(); @@ -28,6 +41,7 @@ public class ConfigHandler { private static void syncConfig() { String category = Configuration.CATEGORY_GENERAL; + String colorcat = Configuration.CATEGORY_CLIENT; soulHealthBoost = config.getBoolean("Soul Stone health boost", category, true, "Should the Soul Stone have a health boost"); useSHRealityAbilities = config.getBoolean("SH Reality Stone abilities", category, false, "Should the Reality Stone have the abilities of the Speedster Heroes Reality Stone if it is installed"); sizeChanging = config.getBoolean("Size changing", category, true, "Should the Reality Stone be able to change the size"); @@ -36,7 +50,19 @@ public class ConfigHandler { snapCreative = config.getBoolean("Can Snap change Gamemode", category, false, "Can the Snap change the Gamemode to Creative"); heAbilities = config.getBoolean("HeroesExpansion Abilities", category, true, "Should some stones use abilities from HeroesExpansion"); stAbilities = config.getBoolean("StarTech Abilities", category, true, "Should the Power Stone use the abilities from the StarTech Power Stone if installed"); - powerCooldown= config.getInt("Power Burst Cooldown", category, 100, 0, 1000, "How big long should the StarTech Power Stone burst cooldown be"); + powerCooldown = config.getInt("Power Burst Cooldown", category, 100, 0, 1000, "How big long should the StarTech Power Stone burst cooldown be"); + + powerStoneColor = config.getInt("Power Stone color", colorcat, 0xC32AD1, 0x000000, 0xFFFFFF, "Color of the Power Stone"); + powerStoneShine = config.getInt("Power Stone shine", colorcat, 0xF12AFF, 0x000000, 0xFFFFFF, "Shine color of the Power Stone"); + realityStoneColor = config.getInt("Reality Stone color", colorcat, 0xFF0130, 0x000000, 0xFFFFFF, "Color of the Reality Stone"); + realityStoneShine = config.getInt("Reality Stone shine", colorcat, 0xFF0130, 0x000000, 0xFFFFFF, "Shine color of the Reality Stone"); + timeStoneColor = config.getInt("Time Stone color", colorcat, 0x13CF55, 0x000000, 0xFFFFFF, "Color of the Time Stone"); + timeStoneShine = config.getInt("Time Stone shine", colorcat, 0x12E772, 0x000000, 0xFFFFFF, "Shine color of the Time Stone"); + mindStoneColor = config.getInt("Mind Stone color", colorcat, 0xFFD300, 0x000000, 0xFFFFFF, "Color of the Mind Stone"); + mindStoneShine = config.getInt("Mind Stone shine", colorcat, 0xDAFF0A, 0x000000, 0xFFFFFF, "Shine color of the Mind Stone"); + soulStoneColor = config.getInt("Soul Stone color", colorcat, 0xDE7300, 0x000000, 0xFFFFFF, "Color of the Soul Stone"); + soulStoneShine = config.getInt("Soul Stone shine", colorcat, 0xFF8B00, 0x000000, 0xFFFFFF, "Shine color of the Soul Stone"); + } } diff --git a/src/main/java/anvil/infinity/items/Items.java b/src/main/java/anvil/infinity/items/Items.java index 9146711..de4b3b1 100644 --- a/src/main/java/anvil/infinity/items/Items.java +++ b/src/main/java/anvil/infinity/items/Items.java @@ -2,6 +2,8 @@ package anvil.infinity.items; import anvil.infinity.Infinity; import java.awt.*; + +import anvil.infinity.config.ConfigHandler; import lucraft.mods.lucraftcore.infinity.render.ItemRendererInfinityStone; import lucraft.mods.lucraftcore.util.helper.ItemHelper; import net.minecraft.item.Item; @@ -38,11 +40,12 @@ public class Items { public static void onRegisterModels(ModelRegistryEvent e) { OBJLoader.INSTANCE.addDomain(Infinity.MOD_ID); - POWER_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(195, 42, 209), new Color(241, 42, 255))); - MIND_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(255, 211, 0), new Color(218, 255, 10))); - REALITY_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(225, 1, 48), new Color(255, 1, 48))); - SOUL_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(222, 115, 0), new Color(255, 139, 0))); - TIME_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(19, 207, 85), new Color(18, 231, 114))); + POWER_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(ConfigHandler.powerStoneColor), new Color(ConfigHandler.powerStoneShine))); + MIND_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(ConfigHandler.mindStoneColor), new Color(ConfigHandler.mindStoneShine))); + REALITY_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(ConfigHandler.realityStoneColor), new Color(ConfigHandler.realityStoneShine))); + SOUL_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(ConfigHandler.soulStoneColor), new Color(ConfigHandler.soulStoneShine))); + TIME_STONE.setTileEntityItemStackRenderer(new ItemRendererInfinityStone(new Color(ConfigHandler.timeStoneColor), new Color(ConfigHandler.timeStoneShine))); + ItemHelper.registerItemModel(POWER_STONE, Infinity.MOD_ID, "power_stone"); ItemHelper.registerItemModel(MIND_STONE, Infinity.MOD_ID, "mind_stone");