Hey, I've been creating a mod with your tutorials, but when I tried to make a Nether ores, it only spawns in the overworld for some reason. I've got my world generator here, I'm fairly sure I got it all the same like yours. For my base class, It's exactly the same as in your tutorial (really can't do a lot wrong there). Hope you know what I can chance to get it to work.
public class MineCraftPlusWorldGeneration implements IWorldGenerator {
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
{
switch (world.provider.dimensionId)
{
case 0:
generateSurface(world, random, chunkX * 16, chunkZ * 16);
case -1:
generateNether(world, random, chunkX * 16, chunkZ * 16);
case 1:
generateEnd(world, random, chunkX * 16, chunkZ * 16);
}
}
private void generateEnd(World world, Random random, int x, int z)
{
}
private void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int maxX, int maxZ, int maxVeinSize, int chanceToSpawn, int minY, int maxY)
{
for (int i = 0; i < chanceToSpawn; i++)
{
int posX = blockXPos + random.nextInt(maxX);
int posY = minY + random.nextInt(maxY - minY);
int posZ = blockZPos + random.nextInt(maxZ);
new WorldGenMinable(block, maxVeinSize).generate(world, random, posX, posY, posZ);
}
}
Notice Case 0 it spawns in the overworld, Case -1 it spawns in the nether, and Case 1 it spawns in the end? Swamp it with generateSurface.
We can't help you without the code. Please post the code. If it doesn't work make sure your workspace is the forge src you downloaded and not the src or build folder, so it will contain all the files in the workspace and connect with the files there without any errors.
Your talking about making child mods that require you to download the parent mod, so it can connect with it's classes. Just make a class file and another mod that requires that class file.
Hey, I've been creating a mod with your tutorials, but when I tried to make a Nether ores, it only spawns in the overworld for some reason. I've got my world generator here, I'm fairly sure I got it all the same like yours. For my base class, It's exactly the same as in your tutorial (really can't do a lot wrong there). Hope you know what I can chance to get it to work.
public class MineCraftPlusWorldGeneration implements IWorldGenerator {
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
{
switch (world.provider.dimensionId)
{
case 0:
generateSurface(world, random, chunkX * 16, chunkZ * 16);
case -1:
generateNether(world, random, chunkX * 16, chunkZ * 16);
case 1:
generateEnd(world, random, chunkX * 16, chunkZ * 16);
}
}
private void generateEnd(World world, Random random, int x, int z)
{
}
private void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int maxX, int maxZ, int maxVeinSize, int chanceToSpawn, int minY, int maxY)
{
for (int i = 0; i < chanceToSpawn; i++)
{
int posX = blockXPos + random.nextInt(maxX);
int posY = minY + random.nextInt(maxY - minY);
int posZ = blockZPos + random.nextInt(maxZ);
new WorldGenMinable(block, maxVeinSize).generate(world, random, posX, posY, posZ);
}
}
WorldGenMinable has different constructors. The one that was given in the tutorial had to replace stone as default. You need to replace Netherrack. I have a mod which generates ores in the end, and it uses this code instead of the WorldGenMinable constructor:
1. You put a class inside a class in the world gen file, and they were both named differently. Lines 16, 17 and 18 should be removed.
2. "RadiumnightsGeneration eventWorldGen = new RadiumnightsGeneration();" should be replaced with "RadiumnightsGeneration eventWorldGen = new RadiumNightsGen();". Plus, it should not be put in preInit, but before the first @Mod.EventHandler.
If you still have errors, pastebin the classes again.
Updated thread with new information. Also, a new setup tutorial has been released to start off 1.8 tutorials. Even if you have already set up your project, I highly suggest you re-set your project up with this new way, as it is much more effective.
With that being said, I won't be doing 1.7 tutorials anymore (at least, I don't plan to), and with that, I'll start to make 1.8 tutorials, as well as an update tutorial from 1.7 to 1.8.
Thx so much, though it may be much to ask. I'm wanting to work on a power source and such for my mod and if you would be willing to help me. Please PM me. It would be great, as I plan on using my mod in my modpack
Thx so much, though it may be much to ask. I'm wanting to work on a power source and such for my mod and if you would be willing to help me. Please PM me. It would be great, as I plan on using my mod in my modpack
By "power source", you mean RF integration? You can either view the code in the RF API or check documentation for it if there is any. If not, you have to be a decent/great Java programmer.
im getting error at very start saying that it doesnt recognize gradlew as an internal or external command im pretty sure i have the mods directory right because i tried it with search and it opened the mods folder, please help
im getting error at very start saying that it doesnt recognize gradlew as an internal or external command im pretty sure i have the mods directory right because i tried it with search and it opened the mods folder, please help
gradlew will only work if your in a cmd on the forge directory in your mod Project... i just extract a copy of the forge source into my mod folder after git cloning it onto my pc, then shift right click (if windows) the newly extracted forge folder and open command there then run the 2 gradlew commands
Notice Case 0 it spawns in the overworld, Case -1 it spawns in the nether, and Case 1 it spawns in the end? Swamp it with generateSurface.
We can't help you without the code. Please post the code. If it doesn't work make sure your workspace is the forge src you downloaded and not the src or build folder, so it will contain all the files in the workspace and connect with the files there without any errors.
Your talking about making child mods that require you to download the parent mod, so it can connect with it's classes. Just make a class file and another mod that requires that class file.
My tools aren't showing up in game.
ModArmory:
http://prntscr.com/6weqf1
ItemModSword:
http://prntscr.com/6weqwb
I have my tool textures stored with my Item textures.
Did you see my 1st quote on page 46? That should help you. Also, don't leave "static" on its own.
If somethings missing, then you have to go find it. There is nothing more I can say.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWorldGenMinable has different constructors. The one that was given in the tutorial had to replace stone as default. You need to replace Netherrack. I have a mod which generates ores in the end, and it uses this code instead of the WorldGenMinable constructor:
WorldGenMinable(block, 0, maxVeinSize, Blocks.end_stone).
Replace Blocks.end_stone with Blocks.netherrack and you should be fine.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumCreate another folder with forge installed, run it in Eclipse, and then add your code from the broken workspace via using your system explorer.
Hi, so I'm trying to get my block to spawn in the world, but I'm having a trouble with this line
GameRegistry.registerWorldGenerator(this.eventWorldGen, 1);
The error it give is that eventWorldGen cannot be resolved or is not a field
here is my worldgen class http://pastebin.com/RnpUpqfZ
here is my main class
http://pastebin.com/jEBt5sVW
Are you using Forge because it's red?
Full code:
[/p] [p]package com.mod.world;[/p] [p]import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.registry.GameRegistry;[/p] [p]public class Mworld { public static void mainRegistry() { initialiseWorldGen(); } public static void initialiseWorldGen() { registerWorldGen(new ComStoneOre(), 1); } public static void registerWorldGen(IWorldGenerator worldGenClass, int weightedProbability) { GameRegistry.registerWorldGenerator(worldGenClass, weightedProbability); } }[/p] [p]I'm certain I'm using forge, I've followed this tutorial from the beginning.
I have the answer for you. It worked for me.
http://www.minecraftforge.net/forum/index.php?topic=24671.0
I do not answer this, but I Googled it.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumTwo mistakes:
1. You put a class inside a class in the world gen file, and they were both named differently. Lines 16, 17 and 18 should be removed.
2. "RadiumnightsGeneration eventWorldGen = new RadiumnightsGeneration();" should be replaced with "RadiumnightsGeneration eventWorldGen = new RadiumNightsGen();". Plus, it should not be put in preInit, but before the first @Mod.EventHandler.
If you still have errors, pastebin the classes again.
Updated thread with new information. Also, a new setup tutorial has been released to start off 1.8 tutorials. Even if you have already set up your project, I highly suggest you re-set your project up with this new way, as it is much more effective.
With that being said, I won't be doing 1.7 tutorials anymore (at least, I don't plan to), and with that, I'll start to make 1.8 tutorials, as well as an update tutorial from 1.7 to 1.8.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThx so much, though it may be much to ask. I'm wanting to work on a power source and such for my mod and if you would be willing to help me. Please PM me. It would be great, as I plan on using my mod in my modpack
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumBy "power source", you mean RF integration? You can either view the code in the RF API or check documentation for it if there is any. If not, you have to be a decent/great Java programmer.
im getting error at very start saying that it doesnt recognize gradlew as an internal or external command im pretty sure i have the mods directory right because i tried it with search and it opened the mods folder, please help
gradlew will only work if your in a cmd on the forge directory in your mod Project... i just extract a copy of the forge source into my mod folder after git cloning it onto my pc, then shift right click (if windows) the newly extracted forge folder and open command there then run the 2 gradlew commands
ok ill try that
Is there a way I can test my mod before putting it inside the mods folder?