ok I have a question; i'm looking at BedrockMiner's tutorial and they said to import like classes or something and then something like press CTRL + SHIFT + O and and select net.minecraft.item.Item. What does that even mean? Here, i'll show ya'll one of my classes:
package com.lordofchaos20.tutorial.item;
public final class ModItems {
public static Item tutorialItem;
public static final void init() {
tutorialItem = new Item().setUnlocalizedName("tutorialItem").setCreativeTab(CreativeTabs.tabMisc);
GameRegistry.registerItem(tutorialItem, "tutorialItem");
}
}
it says there is an error with Item, tutorialItem, CreativeTabs & GameRegistry.
So how do i fix it? I tried pressing CTRL+SHIFT+O, but it doesn't do anything, much less fix the errors.
CTRL + Shift + O only works in eclipse, I assume you're not using it.
The errors are fixed by importing the classes Item (from minecraft, not from Java, that's what bedrockminer meant), CreativeTabs and GameRegistry. They're all located somewhere in Minecraft's source code, and you have to tell Java where to find them.
ok it made create a new pack called net.minecraft.item and then the classes for Item, tutorialItem, CreativeTabs & GameRegistry[/i]. Am i supposed to do that?
ok now it says that for textures u need to put them in WorkspaceRoot/src/resources/assets/modid/textures/items/. I went to my workspace located at C:/users/Richard/workspace and looked in my src folder but i don't see any folder called resources
unable to launch. I dont think i have anything set up. cause i went to run -> run as -> (none applicable) then i went to run -> debug as -> (none applicable)
GradleStart is created by ForgeGradle when it sets up the workspace and IDE project. You don't create it yourself.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
This page explains how to set up a development environment, including how to fix that error.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
ok I have a question; i'm looking at BedrockMiner's tutorial and they said to import like classes or something and then something like press CTRL + SHIFT + O and and select net.minecraft.item.Item. What does that even mean? Here, i'll show ya'll one of my classes:
it says there is an error with Item, tutorialItem, CreativeTabs & GameRegistry.
So how do i fix it? I tried pressing CTRL+SHIFT+O, but it doesn't do anything, much less fix the errors.
CTRL + Shift + O only works in eclipse, I assume you're not using it.
The errors are fixed by importing the classes Item (from minecraft, not from Java, that's what bedrockminer meant), CreativeTabs and GameRegistry. They're all located somewhere in Minecraft's source code, and you have to tell Java where to find them.
UpcraftLP is correct. To manually import something, type this after your package declaration (before the class declaration)
Do the same for every class that you use or reference. Since there are a lot of classes you reference, you will need to import at least half a dozen.
Do you see why most people use an IDE that can auto-import for them?
Side note: In IntelliJ you use Ctrl + Alt + O
but i am using eclipse. I'm using Eclipse IDE for Java EE Developers. But i'll give what Sky_01 said a try.
ok it made create a new pack called net.minecraft.item and then the classes for Item, tutorialItem, CreativeTabs & GameRegistry[/i]. Am i supposed to do that?
That should work - are you sure you are pressing them down at the same time?
ya im sure i am
Also, if you're on a Mac, it's Command-Shift-O instead.
You can also right click the src folder in the file tree and select Organize Imports
ok now it says that for textures u need to put them in WorkspaceRoot/src/resources/assets/modid/textures/items/. I went to my workspace located at C:/users/Richard/workspace and looked in my src folder but i don't see any folder called resources
src/main/resources/assets/modid/...... create that folder if it's not there.
ok. now how do i test it in minecraft?
Your IDE should provide a feature to debug applications (running them in the dev environment).
unable to launch. I dont think i have anything set up. cause i went to run -> run as -> (none applicable) then i went to run -> debug as -> (none applicable)
Goto run --> run configurations, select Java Application and use GradleStart as start class.
ok i don't have a gradlestart class made. how do i code it out?
GradleStart is created by ForgeGradle when it sets up the workspace and IDE project. You don't create it yourself.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
ok i searched up on how to do it but the build failed. This is what i got:
C:\Users\Richard\Downloads\Forge>gradlew setupDecompWorkspace eclipse
#################################################
ForgeGradle 2.1-SNAPSHOT-da90449
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:getVersionJson
:extractUserdev
:extractDependencyATs SKIPPED
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:deobfMcSRG SKIPPED
:decompileMc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':decompileMc'.
> Java heap space
* 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: 1 mins 3.361 secs
C:\Users\Richard\Downloads\Forge>
This page explains how to set up a development environment, including how to fix that error.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
the only gradlew files i have are gradlew.bat and gradlew(its extension is just "file") But i have no gradlew.sh