Posted April 19, 201510 yr I am adding the ability to dye stone to the colored stone in my mod. It works well but I am having one issue, the light gray dye is the only dye that does not work. I am using the ore dictionary to allow the players to use dyes from other mods. My question is am I getting the ore dictionary name of the dyes correctly and if not what is the correct way of doing it. Relevant Classes Paint Event/Handler: https://github.com/LogicTechCorp/Orizon-1.8/blob/master/src/main/java/orizon/util/PaintEvent.java Enum Type https://github.com/LogicTechCorp/Orizon-1.8/blob/master/src/main/java/orizon/util/EnumType.java Type Utility https://github.com/LogicTechCorp/Orizon-1.8/blob/master/src/main/java/orizon/util/TypeUtility.java
April 20, 201510 yr I think your approach should work if you make sure you check all the OreIDs instead of just the first one, i.e. String dye = OreDictionary.getOreName(id[0]); should be for (int idToCheck : id) { dye = OreDictionary.getOreName[idToCheck]; dye = dye.toLowerCase(); // etc } Alternatively you could use OreDictionary.getOres(dye name) instead, to get a list of all ItemStacks that correspond to each Ore dye, and check each one to see if it matches (this is how recipes work). i.e. - (1) for red, get OreDictionary.getOres("dyeRed"); to retrieve a list of all ItemStacks which are red dye (2) for each redDyeItemStack, check OreDictionary.itemMatches(heldItemStack, redDyeItemStack, true) (3) repeat for all remaining dye colours -TGG
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.