Advanced XRay (Neoforge Edition)

Advanced XRay (Neoforge Edition)

5M Downloads

Ore Dictionary block adding isn't working correctly

MichaelHillcox opened this issue ยท 3 comments

commented

When first creating and updating the conf the mod is unable to find and add Ore Dictionaried blocks to the GUI list.

  • Rewrite the addition code for the config.
  • Add a way to add new ores from the oreDictionary.
commented

@Shalar Sorry, I completely missed your comment. Thanks for your input. As it stands I've done a very simple fix for the ores by simplifying the original system. :D

commented

This is going to require me to manual add support for other mods. This should be fun.

commented

I have been going over your code a little bit, and although I'm not completely sure of how you are initially adding ores to OreInfo.searchList; when you initially add oredict entries cant you use something like the below code, while keeping in mind that one oredict entry can have multiple blocks associated with it, and one block can have multple oredict entries which means you could potentially have 1 block under two oredict entries. Also the part with tempBlock.getItemID() wont work because I put that there because I couldnt figure out how to return the item ID from an ItemStack object. I would also check if the getOres(oreNameHere,false) returns empty.

for (ItemStack tempBlock : OreDictionary.getOres(oreNameHere,false)){ OresSearch.add(tempBlock.getItemID(), tempBlock.getMetadata(), tempBlock.getItem().getUnlocalizedName(), rgbColorArrayHere) }