okay one more question how do i export my minecraft mod?
Open up Terminal/Command Prompt, and change the directory (cd) to your Forge folder. Then type 'gradlew build' (Windows), or './gradlew build' (Mac). You'll need to edit your build.gradle file to change some things (specifying where your main class file is, etc.). Hopefully that will get you pointed in the right direction.
Hey, I have been following your tutorials and I am on #3. I would like to know what exactly an error means, because I don't know if I am getting them or not. Is it the red line under the word (ex: @Mod or FMLPreInitializationEvent)? I am on Windows 8 and I pressed Ctrl + Shift + O and it made an import at the very top. When I made the ModItems class file it didn't have the publicstaticvoid init in the middle area. Was it supposed to do that automatically?
Thanks,
Hey, I have been following your tutorials and I am on #3. I would like to know what exactly an error means, because I don't know if I am getting them or not. Is it the red line under the word (ex: @Mod or FMLPreInitializationEvent)? I am on Windows 8 and I pressed Ctrl + Shift + O and it made an import at the very top. When I made the ModItems class file it didn't have the publicstaticvoid init in the middle area. Was it supposed to do that automatically?
Thanks,
Brockstar
An error is an error, which would be the red line. Ctrl-Shift-O will automatically "import" classes in, removing the error some of the times (there are cases where you can get non-importing related errors).
You need to create the method init in your ModItems class manually; it won't automatically create it for you.
Thanks for the tutorials I've found them all very useful. I've followed them all and now I'm ready to create my own basic mod, one thing I can't find covered however is how you setup/organise multiple mods? I didn't want to just delete the tutorial mod because I wanted to reference back to it in case I forget something but its not clear how you should change your setup to develop multiple mods simultaneously. Any ideas?
I just create multiple workspaces really. So, basically you would just began the entire setup process again, except, with a different name (in the version folder [e.g. 1.7]). For instance, here is my file hierarchy if I have two mods setup:
Now, you will need to install forge again on the second mod, however, it should run much faster this time. Hopefully you can understand what I am talking about :).
Once you have forge setup, boot up Eclipse, and a window should pop-up asking for a workspace. Just navigate to your new forge/eclipse folder for the second mod, and it will load up pretty much a new workspace for that mod. If it doesn't pop-up, there is a way to change workspaces inside of Eclipse - I've done it before, but forgotten how, but it shouldn't take long to find out how.
Yeah I understand, thanks. Was trying to find a way round having to set everything up again but the ways I've found are complicated and messy. At least this way keeps it nice and clean
Also what is the significance of this line when creating a block:
super(Material.iron);
What does it do and what is the significance of the material?
Thanks for the help
I know there is a way to setup multiple projects in the same workspace, although I remember someone telling me it would cause issues down the road.
The super keyword calls the parent class (in this case - Block). In this case, we are specifically calling the parents constructor, since it is in our constructor. Also as a side note, you can use the super keyword to access instance variables and methods from the parent class (if block had an integer, we could use that integer with the super keyword).
As for the Material, the Block's constructor has it as a parameter, so we need to fill that in with the material of our Block. Here is the Block's constructor:
As you can see, this has the parameter of "Material". The material of a block determines what sound it makes when you mine it really, and a few other things potentially (look in the Material class for more information).
YUP!! But when I finally got the ./gradlew setupDecompWorkspace command in it did everything but at the end it said failed after showing a bunch of things that it downloaded then what do I do next I don't get that part of the doc? https://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/lunasr1a that tis the eclipse I downloaded.
YUP!! But when I finally got the ./gradlew setupDecompWorkspace command in it did everything but at the end it said failed after showing a bunch of things that it downloaded then what do I do next I don't get that part of the doc? https://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/lunasr1a that tis the eclipse I downloaded.
It's not an issue with Eclipse I don't think - can you show me the error you got? Try re-doing that command first though, and see if it works that time.
Glad you are enjoying the tutorials
~Summon Your Cheeky Creations~
Open up Terminal/Command Prompt, and change the directory (cd) to your Forge folder. Then type 'gradlew build' (Windows), or './gradlew build' (Mac). You'll need to edit your build.gradle file to change some things (specifying where your main class file is, etc.). Hopefully that will get you pointed in the right direction.
also here's a gallery of several other textures i made for this mod:
http://www.piskelapp.com/user/6380174253752320
Thanks,
Brockstar
An error is an error, which would be the red line. Ctrl-Shift-O will automatically "import" classes in, removing the error some of the times (there are cases where you can get non-importing related errors).
You need to create the method init in your ModItems class manually; it won't automatically create it for you.
Glad you got it working yourself
I just create multiple workspaces really. So, basically you would just began the entire setup process again, except, with a different name (in the version folder [e.g. 1.7]). For instance, here is my file hierarchy if I have two mods setup:
Now, you will need to install forge again on the second mod, however, it should run much faster this time. Hopefully you can understand what I am talking about :).
Once you have forge setup, boot up Eclipse, and a window should pop-up asking for a workspace. Just navigate to your new forge/eclipse folder for the second mod, and it will load up pretty much a new workspace for that mod. If it doesn't pop-up, there is a way to change workspaces inside of Eclipse - I've done it before, but forgotten how, but it shouldn't take long to find out how.
I know there is a way to setup multiple projects in the same workspace, although I remember someone telling me it would cause issues down the road.
The super keyword calls the parent class (in this case - Block). In this case, we are specifically calling the parents constructor, since it is in our constructor. Also as a side note, you can use the super keyword to access instance variables and methods from the parent class (if block had an integer, we could use that integer with the super keyword).
As for the Material, the Block's constructor has it as a parameter, so we need to fill that in with the material of our Block. Here is the Block's constructor:
protected Block(Material p_i45394_1_) { this.stepSound = soundTypeStone; this.blockParticleGravity = 1.0F; this.slipperiness = 0.6F; this.blockMaterial = p_i45394_1_; this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); this.opaque = this.isOpaqueCube(); this.lightOpacity = this.isOpaqueCube() ? 255 : 0; this.canBlockGrass = !p_i45394_1_.getCanBlockGrass(); }As you can see, this has the parameter of "Material". The material of a block determines what sound it makes when you mine it really, and a few other things potentially (look in the Material class for more information).
It's not an issue with Eclipse I don't think - can you show me the error you got? Try re-doing that command first though, and see if it works that time.
Probably not, unfortunately. I feel like these text tutorials are doing what they need to do fine.