It shouldn't go ahead and automatically import simply because there is another Java class file that has the name 'Reference', so when you go to import it, you will need to choose the right one.
Have you created your Reference class though?
Hmm, yea I created it. When you right click on the main package and add a new package, should it go into that first package, or into the src/main/java folder? It isn't letting me put it into the main package.
something went wrong while setting up my environment. when i tried to set up forge, the files were downloading but i got this message in the attachment. where can i get a jdk?
Hmm, yea I created it. When you right click on the main package and add a new package, should it go into that first package, or into the src/main/java folder? It isn't letting me put it into the main package.
something went wrong while setting up my environment. when i tried to set up forge, the files were downloading but i got this message in the attachment. where can i get a jdk?
I had the same problem. I google JDK and it brought up the java page. Read the instructions on which one you should download for you OS, and do it. I redid that step and everything worked perfectly.
One more question, the windows versions seem to be windows x86 and x64... now whenever i see the number 64 i always associate it to 64 bit, but my computer is an unfortunate 32-bit (with a pentium 4 processor, even more unfortunate.) are my assuptions wrong, or do i require a 64 bit system to run the development kit?
One more question, the windows versions seem to be windows x86 and x64... now whenever i see the number 64 i always associate it to 64 bit, but my computer is an unfortunate 32-bit (with a pentium 4 processor, even more unfortunate.) are my assuptions wrong, or do i require a 64 bit system to run the development kit?
Hi DaKingCartoon,
Your assumption would be incorrect. x86 is for 32 bit and x64 is for 64 bit.
The item texture is in "Minecraft Modding\1.7.10\src\main\resources\assets\nathanwalker1208_Iceland\textures\items\frostBlade.png"
Sorry I took so long. Tell me if you need any more classes to figure out the problem.
Fairly easy fix. You modid has a capital letter in it, in which they need to all be lowercase. Change that in your Reference class, and then refactor (renaming essentially) you texture's package in Eclipse to the new modid, and you should be good to go.
This next one, I didn't get any errors, but wanted to list it just in case.
package com.github.joe13527.simpsons.help;
public class Reference
{
public static final String MODID = "joe13527_Simpsons";
public static final String NAME = "Simpsons";
public static final String VERSION = "1.0.0.0";
}
public class ModItems
{
public static Item duffBeer = new SimpsonsItem().setUnlocalizedName("duffBeer");
public static void init()
{
RegisterHelper.registerItem(duffBeer);
public class RegisterHelper
{
public static void registerBlock(Block block)
{
GameRegistry.registerBlock(block, Reference.MODID + block.getUnlocalizedName().substring(5));
}
public static void registerItem(Item item)
{
GameRegistry.registerItem(item, Reference.MODID + item.getUnlocalizedName().substring(5));
How do i compile my mod? When I do it, it doesn't include textures.
Also, (if you have a moment over, I've been looking around the source code of ascension (looks cool) and i'm learning a few things alongside following other tutorials. This time worldGen and i have a problem. Maybe you know what's wrong?)[http://imgur.com/a/1YJDa]
Ninja edit: gaah this forum doesn't seem to have markdown, working link: http://imgur.com/a/1YJDa
EDIT: first check imgur album. I tried to change a few things here and there and now it looks like the following:
So your trying to get the Slime Ore to spawn as an ore, correct? The way I do it, you only need one class file, and for me, that is called AscensionWorldGeneration. You can control pretty much any world gen aspect here (ores, structures). As for registering the world generator, I just add two lines of code to my main file:
AscensionWorldGeneration eventWorldGen = new AscensionWorldGeneration(); //assigns a new variable, so it goes outside of all methods
GameRegistry.registerWorldGenerator(this.eventWorldGen, 0); //registers the new variable with Minecraft in the preInit method
If you have any questions, or if this wasn't what you need, let m know.
You are right. Well i kinda figured that out, just misread a few things. However, i want to keep it this way i believe and now i'm getting an interesting error at line 20 instead of the previous one. Thanks for your extreme dedication and contribution to the Modding comunity!
*sorry for my terrible wording, pretty tired.
The registerWorldGen parameters are messed up. In the initializeWorldGen method, the parameters need to be worldGenClass and weightedProbability. If you did it that way, you may need to make your block extend IWorldGenerator or something. I don't really know; I would have to plug it all into my workspace.
Ok, I see what you are doing now :). First, you'll want to register your generator (add VincTweaksWorld.mainRegistry() to your preInit method). As for the error your getting, the only thing that I think would be causing it is something in your WorldGenBlockSlimeOre class, so I would go through and check that again.
If that doesn't work, I would see about switching your code to look like mine, as I do it a bit more efficiently in my opinion.
Thanks, its because of this. I'm not sure about the mechanic when you extend multiple things. How does that work?
When i do an implement instead, (modId)World throws "cannot instantinate the type (myBlock)
You wouldn't extend IWorldGenerator, you would implement it. I'd have to look at the code more in-depth though to figure out those errors, but I don't know when I will be able to do that.
"The method registerWorldGenerator(IWorldGenerator, int) in the type GameRegistry is not applicable for the arguments (VincTweaksWorldGeneration, int)"
Sorry for bothering you this much, i think this is pretty interesting actually.
Nah it's fine :). This is what I signed up to do!
Can I see VincTweaksWorldGeneration class? I think its because you aren't implementing IWorldGenerator, but I don't know for sure.
Hmm, yea I created it. When you right click on the main package and add a new package, should it go into that first package, or into the src/main/java folder? It isn't letting me put it into the main package.
HERE is everything I have typed into my class
package com.github.joe13527.modname;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class modname
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
That's how packages work, so you are fine
Yeah, you need JDK.
Thanks!
No problem
One more question, the windows versions seem to be windows x86 and x64... now whenever i see the number 64 i always associate it to 64 bit, but my computer is an unfortunate 32-bit (with a pentium 4 processor, even more unfortunate.) are my assuptions wrong, or do i require a 64 bit system to run the development kit?
Here's my code:
Main http://pastebin.com/xkBKkpey
ModBlocks http://pastebin.com/KD5Pbs19
ModItems http://pastebin.com/nMKWNDTJ
ItemFrostBlade http://pastebin.com/z5K2ch2H
The item texture is in "Minecraft Modding\1.7.10\src\main\resources\assets\nathanwalker1208_Iceland\textures\items\frostBlade.png"
Sorry I took so long. Tell me if you need any more classes to figure out the problem.
Hi DaKingCartoon,
Your assumption would be incorrect. x86 is for 32 bit and x64 is for 64 bit.
this is the best news i've heard in a while, you wouldn't beleive how many things i've been screwed out of because of my cardboard processor
Fairly easy fix. You modid has a capital letter in it, in which they need to all be lowercase. Change that in your Reference class, and then refactor (renaming essentially) you texture's package in Eclipse to the new modid, and you should be good to go.
For this one i've got errors on line 6 and 13.
------------------------------------------------------------------------------------------------------------------------------
package com.github.joe13527.simpsons;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class Simpsons
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.Init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
----------------------------------------------------------------------------------------------------------------------------
This next one, I didn't get any errors, but wanted to list it just in case.
package com.github.joe13527.simpsons.help;
public class Reference
{
public static final String MODID = "joe13527_Simpsons";
public static final String NAME = "Simpsons";
public static final String VERSION = "1.0.0.0";
}
-------------------------------------------------------------------------------------------------------------------------
This one also doesn't have any errors.
package com.github.joe13527.simpsons.init;
import com.github.joe13527.simpsons.help.RegisterHelper;
import com.github.joe13527.simpsons.items.SimpsonsItem;
import net.minecraft.item.Item;
public class ModItems
{
public static Item duffBeer = new SimpsonsItem().setUnlocalizedName("duffBeer");
public static void init()
{
RegisterHelper.registerItem(duffBeer);
}
}
------------------------------------------------------------------------------------------------------------------------------------------
I got an error on line 2, 9, and 15.
package com.github.joe13527.simpsons.help;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
public class RegisterHelper
{
public static void registerBlock(Block block)
{
GameRegistry.registerBlock(block, Reference.MODID + block.getUnlocalizedName().substring(5));
}
public static void registerItem(Item item)
{
GameRegistry.registerItem(item, Reference.MODID + item.getUnlocalizedName().substring(5));
}
}
For your first error, ModItems.Init(), the I needs to lowercase like ModItems.init().
As for the second one, the error seems to be because your modid has a capital letter in it, which they have to be all lowercase.
Awesome!
So your trying to get the Slime Ore to spawn as an ore, correct? The way I do it, you only need one class file, and for me, that is called AscensionWorldGeneration. You can control pretty much any world gen aspect here (ores, structures). As for registering the world generator, I just add two lines of code to my main file:
AscensionWorldGeneration eventWorldGen = new AscensionWorldGeneration(); //assigns a new variable, so it goes outside of all methods
GameRegistry.registerWorldGenerator(this.eventWorldGen, 0); //registers the new variable with Minecraft in the preInit method
The registerWorldGen parameters are messed up. In the initializeWorldGen method, the parameters need to be worldGenClass and weightedProbability. If you did it that way, you may need to make your block extend IWorldGenerator or something. I don't really know; I would have to plug it all into my workspace.
Ok, I see what you are doing now :). First, you'll want to register your generator (add VincTweaksWorld.mainRegistry() to your preInit method). As for the error your getting, the only thing that I think would be causing it is something in your WorldGenBlockSlimeOre class, so I would go through and check that again.
If that doesn't work, I would see about switching your code to look like mine, as I do it a bit more efficiently in my opinion.
You wouldn't extend IWorldGenerator, you would implement it. I'd have to look at the code more in-depth though to figure out those errors, but I don't know when I will be able to do that.
Also, your variable name is eventWorldGen1 in one area, and eventWorldGen in another, so those need to be the same name.
What's the error?
Nah it's fine :). This is what I signed up to do!
Can I see VincTweaksWorldGeneration class? I think its because you aren't implementing IWorldGenerator, but I don't know for sure.