Posted April 22, 201411 yr So whenever I try building my mod using gradle this is what comes up: **************************** Powered By MCP: http://mcp.ocean-labs.de/ Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn MCP Data version : unknown **************************** :compileApiJava UP-TO-DATE :processApiResources UP-TO-DATE :apiClasses UP-TO-DATE :sourceMainJava UP-TO-DATE :compileJava warning: [options] bootstrap class path not set in conjunction with -source 1.6 /Users/Tiffit/Desktop/MyMods/forge/build/sources/java/com/tiffit/MoFoodMod/PizzaOven/PizzaOvenRecipies.java:3: error: package gnu.trove.map does not exist import gnu.trove.map.TMap; ^ /Users/Tiffit/Desktop/MyMods/forge/build/sources/java/com/tiffit/MoFoodMod/PizzaOven/PizzaOvenRecipies.java:4: error: package gnu.trove.map.hash does not exist import gnu.trove.map.hash.TCustomHashMap; ^ /Users/Tiffit/Desktop/MyMods/forge/build/sources/java/com/tiffit/MoFoodMod/PizzaOven/PizzaOvenRecipies.java:5: error: package gnu.trove.strategy does not exist import gnu.trove.strategy.HashingStrategy; ^ /Users/Tiffit/Desktop/MyMods/forge/build/sources/java/com/tiffit/MoFoodMod/PizzaOven/PizzaOvenRecipies.java:32: error: cannot find symbol private final TMap<ItemStack, ItemStack> recipes = new TCustomHashMap<ItemStack, ItemStack>(new HashingStrategy<ItemStack>() { ^ symbol: class TMap location: class PizzaOvenRecipies /Users/Tiffit/Desktop/MyMods/forge/build/sources/java/com/tiffit/MoFoodMod/PizzaOven/PizzaOvenRecipies.java:32: error: cannot find symbol private final TMap<ItemStack, ItemStack> recipes = new TCustomHashMap<ItemStack, ItemStack>(new HashingStrategy<ItemStack>() { ^ symbol: class TCustomHashMap location: class PizzaOvenRecipies /Users/Tiffit/Desktop/MyMods/forge/build/sources/java/com/tiffit/MoFoodMod/PizzaOven/PizzaOvenRecipies.java:32: error: cannot find symbol private final TMap<ItemStack, ItemStack> recipes = new TCustomHashMap<ItemStack, ItemStack>(new HashingStrategy<ItemStack>() { ^ symbol: class HashingStrategy location: class PizzaOvenRecipies Note: /Users/Tiffit/Desktop/MyMods/forge/build/sources/java/com/tiffit/MoFoodMod/items/GreenApple.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 6 errors 1 warning :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 16.037 secs
April 22, 201411 yr package gnu.trove.map does not exist package gnu.trove.map.hash does not exist package gnu.trove.strategy does not exist You are using a library neither included in Minecraft nor Forge. It is harder for us to fix your problem if you do not give us source code.
April 22, 201411 yr Author Here is my pizzaovenrecipies class because that seems to be where the problem is comming from package com.tiffit.MoFoodMod.PizzaOven; import gnu.trove.map.TMap; import gnu.trove.map.hash.TCustomHashMap; import gnu.trove.strategy.HashingStrategy; import net.minecraft.item.ItemStack; enum PizzaOvenRecipies { INSTANCE; public void addRecipe(ItemStack input, ItemStack output) { recipes.put(checkNotNull(input), checkNotNull(output)); } public static <T> T checkNotNull(T reference) { if (reference == null) { throw new NullPointerException(); } return reference; } public ItemStack findResult(ItemStack input) { ItemStack result = recipes.get(input); if (result != null) { return result; } return null; } private final TMap<ItemStack, ItemStack> recipes = new TCustomHashMap<ItemStack, ItemStack>(new HashingStrategy<ItemStack>() { @Override public int computeHashCode(ItemStack stack) { int result = stack.getItem().hashCode(); result = 31 * result + stack.getItemDamage(); return result; } @Override public boolean equals(ItemStack o1, ItemStack o2) { if (o1 == o2) { return true; } if (o1.getItem() != o2.getItem()) { return false; } if (o1.getItemDamage() != o2.getItemDamage()) { return false; } return true; } }); }
April 22, 201411 yr 1. Assuming you already have your workspace set up, create a new folder named "/lib" in your project directory. That's the directory that contains your /bin, /build, /gradle, and /src folders, and now also has a /lib folder. 2. Ask the mod author(s) for a binary distributable / source file of their mod and place it in the /lib folder you just created. 3. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then "Add External JARs" and find the binary file that you just placed in the /lib folder. 4. If the API author provided a source file, open the "Referenced Libraries" tree in your package explorer, find the API binary that you just referenced and right-click on it; go to "Properties" -> "External location" -> "External file" and navigate to wherever you stored the source file, preferably right next to the binary in the /lib folder. 5. Run your debug configuration and see if everything is still working; if so, great! If not, you may need to run setupDev and setupDecomp workspace one more time: a. gradlew setupDevWorkspace b. gradlew setupDecompWorkspace c. gradlew eclipse // will vary depending on your IDE Once you have the debug client working, you should see that both your mod and the API are loaded; if you start a new game, anything added by the API mod will be in that game as well and should be fully functional. This is extremely handy while developing an addon or simply testing compatibility between mods. You are now ready to start using the API in your mod! Tutorial by coolAlias.
April 22, 201411 yr Author 2. Ask the mod author(s) for a binary distributable / source file of their mod and place it in the /lib folder you just created. mod author(s) for what mod? my mod? cause I am the author my my own mod.
April 22, 201411 yr dand0 is talking about Trove. Read their license before you start following dand's directions.
April 22, 201411 yr Author dand0 is talking about Trove. Read their license before you start following dand's directions. Oh ok, thanks! Can anyone show me where the source code download is for Trove? I can't find it. Thanks!
April 22, 201411 yr First, check out TLDRLegal's page that explains the LGPL v2.1 (the license that Trove is under). The source should be located in "trove-<VERSION>.zip/<VERSION>/src". Extract that folder and put the contents of the "src" into a zip. The zip file will be your source file.
April 23, 201411 yr Author First, check out TLDRLegal's page that explains the LGPL v2.1 (the license that Trove is under). The source should be located in "trove-<VERSION>.zip/<VERSION>/src". Extract that folder and put the contents of the "src" into a zip. The zip file will be your source file. Wow! That worked! Thanks!
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.