Simple Modding Q&As

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
C

chbachman

Guest
I have googled it. I haven't found anything. Please help because I want to get back to coding but I cant test to see if it works. :(
PS: This happened right after I tried uploading to Github.

Please, try harder to google. This was from the second result.

Second Result From Google said:
Open up your 'Run Configurations'; the old main class should was "net.minecraft.launchwrapper.Launch" - change this to "GradleStart", which you may need to use the 'Search' button next to the input box to make sure your system can actually find it.

Next, in the "Arguments" tab, remove ALL 'Program Arguments' - it should be totally blank, though you can add in your username if you want.

VM Arguments stay the same: "-Dfml.ignoreInvalidMinecraftCertificates=true"

Finally, make sure you have the new 1.7.10 assets stuff in your .gradle/caches/minecraft/assets folder; there should be an 'indexes' and 'objects' folder with a 1.7.10.json and legacy.json file in the 'indexes' folder and a ton of alphabet folders in the 'objects' folder - you can find these assets in your Minecraft directory if needed.
 

SatanicSanta

New Member
Jul 29, 2019
4,849
-3
0
Oh OreDict, lovely messy OreDict.

Anyone know how to deal with this crap? http://puu.sh/bZkp7/7b032f92d9.png Basically, I need to change all usage of the getOreID and getOres (int version, because now it uses strings) to the updated versions. Also for some reason toArray(ItemStack) is being mean as well, not sure what's goin on there. There is also that annoying "type parameters of T cannot be determined" thing, which all of the Stackoverflow things I read were not helpful >.>

Relevant classes:
https://github.com/Flaxbeard/Flaxbe...laxbeard/steamcraft/api/book/BookPageDip.java
https://github.com/Flaxbeard/Flaxbe...xbeard/steamcraft/api/book/BookPageAlloy.java
https://github.com/Flaxbeard/Flaxbe...teamcraft/handler/SteamcraftEventHandler.java
https://github.com/Flaxbeard/Flaxbe...mcraft/integration/BloodMagicIntegration.java
 

squeek502

New Member
Jul 29, 2019
146
0
0
Oh OreDict, lovely messy OreDict.

Anyone know how to deal with this crap? http://puu.sh/bZkp7/7b032f92d9.png Basically, I need to change all usage of the getOreID and getOres (int version, because now it uses strings) to the updated versions. Also for some reason toArray(ItemStack) is being mean as well, not sure what's goin on there. There is also that annoying "type parameters of T cannot be determined" thing, which all of the Stackoverflow things I read were not helpful >.>

Relevant classes:
https://github.com/Flaxbeard/Flaxbe...laxbeard/steamcraft/api/book/BookPageDip.java
https://github.com/Flaxbeard/Flaxbe...xbeard/steamcraft/api/book/BookPageAlloy.java
https://github.com/Flaxbeard/Flaxbe...teamcraft/handler/SteamcraftEventHandler.java
https://github.com/Flaxbeard/Flaxbe...mcraft/integration/BloodMagicIntegration.java
I'm not terribly knowledgeable about the ore dictionary, but from what I know, getOreID isn't reliable because a given ItemStack can be registered under multiple OreDictionary entries (meaning your current code could easily misbehave and give you the wrong ore ID if the item is registered under multiple entries). Using only non-deprecated methods:
Code:
int[] firstLiquidOreIDs = OreDictionary.getOreIDs(formula.liquid1.ingot);
int firstLiquidOreID;
if (firstLiquidOreIDs.length > 1)
{
    // need to resolve the ore id in this case, or perhaps concat ore lists?
}
else if (firstLiquidOreIDs.length > 0)
{
    firstLiquidOreID = firstLiquidOreIDs[0];
}
else
{
   // bad news
}
item1 = OreDictionary.getOres(OreDictionary.getOreName(firstLiquidOreID)).toArray(new ItemStack[0]);

The ideal would probably be to just store the oredict name whenever possible rather than have to get it from an ItemStack each time, as it seems like you're counting on oredict entries existing anyway.

EDIT: Oh, and you can get around getOres(int) being private by explicity using getOres(Integer), if you don't mind using deprecated methods:
Code:
int oreID = 1;
ArrayList<ItemStack> ores = OreDictionary.getOres(Integer.valueOf(oreID));
 
Last edited: