Am I doing something wrong or.. for some reason when I use your code until the end of tutor 5, items and blocks get registered as "Reference.MODID.mymodid_myitemsname". The mymodid and myitemsname are not the names of the things. Am I doing something wrong or is this intended to be fixed in later tutorials? Here's a thing in the log I hope will help:
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: * Illegal extra prefix olivicblocks for name olivicblocks:testItem, invalid registry invocation/invalid name?
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:799)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:143)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:131)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.RegisterHelper.registerItem(RegisterHelper.java:14)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.init.ModItems.init(ModItems.java:11)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.MainClass.preInit(MainClass.java:15)...
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: * Illegal extra prefix olivicblocks for name olivicblocks:testBlock, invalid registry invocation/invalid name?
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerBlock(GameData.java:855)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:223)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:182)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:171)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.RegisterHelper.registerBlock(RegisterHelper.java:10)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.init.ModBlocks.init(ModBlocks.java:11)...
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: * Illegal extra prefix olivicblocks for name olivicblocks:testBlock, invalid registry invocation/invalid name?
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:799)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:226)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:182)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:171)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.RegisterHelper.registerBlock(RegisterHelper.java:10)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.init.ModBlocks.init(ModBlocks.java:11)...
[13:28:32] [Client thread/WARN] [FML]: ****************************************
I have another complaint with your OreGen tutorial. The OreGen code you gave us has a million errors in it, and I get a crash whenever I try to load a world because of it. Commented all the oregen code out for now. By the way, I would really appreciate it if you added an OreDict tutorial.
Crash log:
[15:02:18] [main/INFO] [GradleStart]: Extra: []
[15:02:18] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/AtaDoruk/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker]
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[15:02:18] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading
[15:02:18] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_40, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_40
[15:02:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
[15:02:18] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
[15:02:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:02:18] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[15:02:20] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[15:02:20] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:02:20] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[15:02:20] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
[15:02:20] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
[15:02:20] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[15:02:21] [main/INFO]: Setting user: Player689
[15:02:23] [Client thread/INFO]: LWJGL Version: 2.9.1
[15:02:24] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[15:02:24] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized
[15:02:24] [Client thread/INFO] [FML]: Replaced 183 ore recipies
[15:02:24] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[15:02:25] [Client thread/INFO] [FML]: Searching D:\Files\Minecraft\My Mods\1.7.10\eclipse\mods for mods
[15:02:28] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[15:02:29] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, Reference.MODID] at CLIENT
[15:02:29] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, Reference.MODID] at SERVER
[15:02:29] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Reference.NAME
[15:02:29] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[15:02:29] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
[15:02:29] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[15:02:29] [Client thread/INFO] [FML]: Applying holder lookups
[15:02:29] [Client thread/INFO] [FML]: Holder lookups applied
[15:02:29] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:29] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[15:02:30] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[15:02:30] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:02:30] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[15:02:30] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:30] [Sound Library Loader/INFO]: Sound engine started
[15:02:31] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[15:02:31] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[15:02:32] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[15:02:32] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Reference.NAME
[15:02:32] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[15:02:32] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:32] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:32] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[15:02:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[15:02:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:02:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[15:02:33] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:33] [Sound Library Loader/INFO]: Sound engine started
[15:02:50] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
[15:02:50] [Server thread/INFO]: Generating keypair
[15:02:50] [Server thread/INFO]: Converting map!
[15:02:50] [Server thread/INFO]: Scanning folders...
[15:02:50] [Server thread/INFO]: Total conversion count is 0
[15:02:50] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
[15:02:50] [Server thread/INFO] [FML]: Applying holder lookups
[15:02:50] [Server thread/INFO] [FML]: Holder lookups applied
[15:02:51] [Server thread/INFO] [FML]: Loading dimension 0 (WorldGenTestWorld) ([email protected])
[15:02:51] [Server thread/INFO] [FML]: Loading dimension 1 (WorldGenTestWorld) ([email protected])
[15:02:51] [Server thread/INFO] [FML]: Loading dimension -1 (WorldGenTestWorld) ([email protected])
[15:02:51] [Server thread/INFO]: Preparing start region for level 0
[15:02:51] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.Error: Unresolved compilation problems:
The method generateSurface(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateNether(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateEnd(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
Syntax error, insert ";" to complete BlockStatements
void is an invalid type for the variable generateSurface
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
The method addOreSpawn(Block, World, Random, int, int, int, int, int, int, int, int) is undefined for the type OlivicBlocksWorldGen
void is an invalid type for the variable generateNether
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable generateEnd
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable addOreSpawn
Syntax error on token "(", ; expected
Block cannot be resolved to a type
Syntax error on token ",", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
at com.hlaaftana.mods.OlivicBlocks.generation.OlivicBlocksWorldGen.generate(OlivicBlocksWorldGen.java:16) ~[OlivicBlocksWorldGen.class:?]
at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106) ~[GameRegistry.class:?]
at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:314) ~[ChunkProviderServer.class:?]
at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157) ~[Chunk.class:?]
at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208) ~[ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149) ~[ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119) ~[ChunkProviderServer.class:?]
at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79) ~[IntegratedServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) ~[IntegratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
[15:02:51] [Server thread/ERROR]: This crash report has been saved to: D:\Files\Minecraft\My Mods\1.7.10\eclipse\.\crash-reports\crash-2015-03-25_15.02.51-server.txt
[15:02:52] [Server thread/INFO] [FML]: Applying holder lookups
[15:02:52] [Server thread/INFO] [FML]: Holder lookups applied
[15:02:52] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STARTING and forced into state SERVER_STOPPED. Errors may have been discarded.
[15:02:52] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// Why is it breaking
Time: 25.03.2015 15:02
Description: Exception in server tick loop
java.lang.Error: Unresolved compilation problems:
The method generateSurface(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateNether(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateEnd(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
Syntax error, insert ";" to complete BlockStatements
void is an invalid type for the variable generateSurface
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
The method addOreSpawn(Block, World, Random, int, int, int, int, int, int, int, int) is undefined for the type OlivicBlocksWorldGen
void is an invalid type for the variable generateNether
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable generateEnd
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable addOreSpawn
Syntax error on token "(", ; expected
Block cannot be resolved to a type
Syntax error on token ",", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
at com.hlaaftana.mods.OlivicBlocks.generation.OlivicBlocksWorldGen.generate(OlivicBlocksWorldGen.java:16)
at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106)
at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:314)
at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157)
at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208)
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149)
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119)
at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305)
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79)
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_40, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 859724472 bytes (819 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Reference.MODID{Reference.VERSION} [Reference.NAME] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 0 / 8; []
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'
[15:02:52] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@[email protected]# Game crashed! Crash report saved to: #@[email protected]# .\crash-reports\crash-2015-03-25_15.02.51-server.txt
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
public class OlivicBlocksWorldGen 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 generateSurface(World world, Random random, int x, int z){
addOreSpawn(ModBlocks.oreMagnesium, world, random, x, z, 16, 16, 5 + random.nextInt(3), 12, 48, 128);
}
private void generateNether(World world, Random random, int x, int z){
}
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);
}
}
}
}
@Mod(modid = "Reference.MODID", name = "Reference.NAME", version = "Reference.VERSION")
public class MainClass {
OlivicBlocksWorldGen eventWorldGen = new OlivicBlocksWorldGen();
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
ModItems.init();
ModBlocks.init();
GameRegistry.registerWorldGenerator(this.eventWorldGen, 0);
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event){
Recipes.init();
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event){
Am I doing something wrong or.. for some reason when I use your code until the end of tutor 5, items and blocks get registered as "Reference.MODID.mymodid_myitemsname". The mymodid and myitemsname are not the names of the things. Am I doing something wrong or is this intended to be fixed in later tutorials? Here's a thing in the log I hope will help:
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: * Illegal extra prefix olivicblocks for name olivicblocks:testItem, invalid registry invocation/invalid name?
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:799)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:143)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:131)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.RegisterHelper.registerItem(RegisterHelper.java:14)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.init.ModItems.init(ModItems.java:11)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.MainClass.preInit(MainClass.java:15)...
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: * Illegal extra prefix olivicblocks for name olivicblocks:testBlock, invalid registry invocation/invalid name?
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerBlock(GameData.java:855)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:223)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:182)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:171)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.RegisterHelper.registerBlock(RegisterHelper.java:10)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.init.ModBlocks.init(ModBlocks.java:11)...
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: * Illegal extra prefix olivicblocks for name olivicblocks:testBlock, invalid registry invocation/invalid name?
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:799)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:226)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:182)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:171)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.RegisterHelper.registerBlock(RegisterHelper.java:10)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.init.ModBlocks.init(ModBlocks.java:11)...
[13:28:32] [Client thread/WARN] [FML]: ****************************************
In the RegisterHelper class, try removing the modid part in the String.
I'm having a problem with the setStepSound method in the 7th tutorial. The game crashes after a while once inside my world, and the Eclipse console shows this:
[12:24:17] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: ERROR MESSAGE:
[12:24:17] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem did not load after 30 seconds.
[12:24:17] [Sound Library Loader/INFO]: Sound engine started
[12:24:18] [Server thread/INFO]: Stopping server
Then the lines about saving/unloading players, chunks and dimensions comes and then a lot of references to SoundManager and SoundHandler. The setStepSound(soundTypeStone); line is the only one related to sound that I've added, and in fact when removing it, the game runs without a problem. Any idea about what's the problem?
Thanks!
Hmm, not really. Normally the assetDir wouldn't get installed properly, but it would only spit out warning messages instead of crashing. I'm not too sure what the cause would be, although, see about getting the assetDir pointed in the right direction (google it).
I have another complaint with your OreGen tutorial. The OreGen code you gave us has a million errors in it, and I get a crash whenever I try to load a world because of it. Commented all the oregen code out for now. By the way, I would really appreciate it if you added an OreDict tutorial.
Crash log:
[15:02:18] [main/INFO] [GradleStart]: Extra: []
[15:02:18] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/AtaDoruk/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker]
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[15:02:18] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading
[15:02:18] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_40, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_40
[15:02:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
[15:02:18] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
[15:02:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:02:18] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[15:02:20] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[15:02:20] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:02:20] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[15:02:20] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
[15:02:20] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
[15:02:20] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[15:02:21] [main/INFO]: Setting user: Player689
[15:02:23] [Client thread/INFO]: LWJGL Version: 2.9.1
[15:02:24] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[15:02:24] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized
[15:02:24] [Client thread/INFO] [FML]: Replaced 183 ore recipies
[15:02:24] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[15:02:25] [Client thread/INFO] [FML]: Searching D:\Files\Minecraft\My Mods\1.7.10\eclipse\mods for mods
[15:02:28] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[15:02:29] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, Reference.MODID] at CLIENT
[15:02:29] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, Reference.MODID] at SERVER
[15:02:29] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Reference.NAME
[15:02:29] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[15:02:29] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
[15:02:29] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[15:02:29] [Client thread/INFO] [FML]: Applying holder lookups
[15:02:29] [Client thread/INFO] [FML]: Holder lookups applied
[15:02:29] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:29] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[15:02:30] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[15:02:30] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:02:30] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[15:02:30] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:30] [Sound Library Loader/INFO]: Sound engine started
[15:02:31] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[15:02:31] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[15:02:32] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[15:02:32] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Reference.NAME
[15:02:32] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[15:02:32] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:32] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:32] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[15:02:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[15:02:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:02:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[15:02:33] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:33] [Sound Library Loader/INFO]: Sound engine started
[15:02:50] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
[15:02:50] [Server thread/INFO]: Generating keypair
[15:02:50] [Server thread/INFO]: Converting map!
[15:02:50] [Server thread/INFO]: Scanning folders...
[15:02:50] [Server thread/INFO]: Total conversion count is 0
[15:02:50] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
[15:02:50] [Server thread/INFO] [FML]: Applying holder lookups
[15:02:50] [Server thread/INFO] [FML]: Holder lookups applied
[15:02:51] [Server thread/INFO] [FML]: Loading dimension 0 (WorldGenTestWorld) ([email protected])
[15:02:51] [Server thread/INFO] [FML]: Loading dimension 1 (WorldGenTestWorld) ([email protected])
[15:02:51] [Server thread/INFO] [FML]: Loading dimension -1 (WorldGenTestWorld) ([email protected])
[15:02:51] [Server thread/INFO]: Preparing start region for level 0
[15:02:51] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.Error: Unresolved compilation problems:
The method generateSurface(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateNether(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateEnd(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
Syntax error, insert ";" to complete BlockStatements
void is an invalid type for the variable generateSurface
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
The method addOreSpawn(Block, World, Random, int, int, int, int, int, int, int, int) is undefined for the type OlivicBlocksWorldGen
void is an invalid type for the variable generateNether
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable generateEnd
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable addOreSpawn
Syntax error on token "(", ; expected
Block cannot be resolved to a type
Syntax error on token ",", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
at com.hlaaftana.mods.OlivicBlocks.generation.OlivicBlocksWorldGen.generate(OlivicBlocksWorldGen.java:16) ~[OlivicBlocksWorldGen.class:?]
at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106) ~[GameRegistry.class:?]
at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:314) ~[ChunkProviderServer.class:?]
at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157) ~[Chunk.class:?]
at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208) ~[ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149) ~[ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119) ~[ChunkProviderServer.class:?]
at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79) ~[IntegratedServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) ~[IntegratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
[15:02:51] [Server thread/ERROR]: This crash report has been saved to: D:\Files\Minecraft\My Mods\1.7.10\eclipse\.\crash-reports\crash-2015-03-25_15.02.51-server.txt
[15:02:52] [Server thread/INFO] [FML]: Applying holder lookups
[15:02:52] [Server thread/INFO] [FML]: Holder lookups applied
[15:02:52] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STARTING and forced into state SERVER_STOPPED. Errors may have been discarded.
[15:02:52] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// Why is it breaking
Time: 25.03.2015 15:02
Description: Exception in server tick loop
java.lang.Error: Unresolved compilation problems:
The method generateSurface(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateNether(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateEnd(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
Syntax error, insert ";" to complete BlockStatements
void is an invalid type for the variable generateSurface
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
The method addOreSpawn(Block, World, Random, int, int, int, int, int, int, int, int) is undefined for the type OlivicBlocksWorldGen
void is an invalid type for the variable generateNether
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable generateEnd
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable addOreSpawn
Syntax error on token "(", ; expected
Block cannot be resolved to a type
Syntax error on token ",", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
at com.hlaaftana.mods.OlivicBlocks.generation.OlivicBlocksWorldGen.generate(OlivicBlocksWorldGen.java:16)
at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106)
at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:314)
at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157)
at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208)
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149)
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119)
at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305)
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79)
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_40, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 859724472 bytes (819 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Reference.MODID{Reference.VERSION} [Reference.NAME] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 0 / 8; []
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'
[15:02:52] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@[email protected]# Game crashed! Crash report saved to: #@[email protected]# .\crash-reports\crash-2015-03-25_15.02.51-server.txt
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
public class OlivicBlocksWorldGen 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 generateSurface(World world, Random random, int x, int z){
addOreSpawn(ModBlocks.oreMagnesium, world, random, x, z, 16, 16, 5 + random.nextInt(3), 12, 48, 128);
}
private void generateNether(World world, Random random, int x, int z){
}
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);
}
}
}
}
@Mod(modid = "Reference.MODID", name = "Reference.NAME", version = "Reference.VERSION")
public class MainClass {
OlivicBlocksWorldGen eventWorldGen = new OlivicBlocksWorldGen();
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
ModItems.init();
ModBlocks.init();
GameRegistry.registerWorldGenerator(this.eventWorldGen, 0);
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event){
Recipes.init();
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event){
}
}
Post your world gen class in a pastebin as it would help tremendously on my end.
Heey, Im at the creative tab part. I've done everything and the items shows that its part of my mod. But when I try to click to the next page of creative tabs to get to mine, the game crashes.
java.lang.NullPointerException: Rendering item
at net.minecraft.item.ItemStack.getItemDamage(ItemStack.java:265)
at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:419)
at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585)
at net.minecraft.client.gui.inventory.GuiContainerCreative.func_147051_a(GuiContainerCreative.java:968)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:795)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:93)
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1057)
at net.minecraft.client.Minecraft.run(Minecraft.java:951)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.item.ItemStack.getItemDamage(ItemStack.java:265)
at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:419)
-- Item being rendered --
Details:
Item Type: null
Item Aux: ~~ERROR~~ NullPointerException: null
Item NBT: null
Item Foil: ~~ERROR~~ NullPointerException: null
Stacktrace:
at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585)
at net.minecraft.client.gui.inventory.GuiContainerCreative.func_147051_a(GuiContainerCreative.java:968)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:795)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:93)
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44)
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673)
Ok I like your tutorials but at times its REALLY not clear... how do I set my texture name for my item? And you did the same for the naming your block. And also how do you set the name for the texture of your block?
Ok I like your tutorials but at times its REALLY not clear... how do I set my texture name for my item? And you did the same for the naming your block. And also how do you set the name for the texture of your block?
1) The texture name for the item would be the unlocalized name.
2) Blocks can use #setBlockTextureName instead of overriding a method.
So, If my item unlocalized name is "godpotatoe" then my I want my substring(4) and the texture named itemgodpotatoe? and for the block it would be substring(5) and blockpotatoe?
Ok, I tried again and again and nothing happenden. I noticed then that I was unzipping the forge folder in the Desktop and my user folder have an "é" character in it, so maybe that was causing some problems when building the project (weird, it would be the first time...). I moved it directly to C: and everything worked fine
I don't have that character in my name but when I moved the Minecraft Modding folder to C: everything worked :3
So, If my item unlocalized name is "godpotatoe" then my I want my substring(4) and the texture named itemgodpotatoe? and for the block it would be substring(5) and blockpotatoe?
Substring removes the first 5 (if set to 5) characters from the beginning of the string. An item's unlocalized name would be "item.itemName". Substring removes the first characters, so the unlocalized name would only be "itemName". Block's unlocalized name gets "tile." put in front of it, so it still uses 5 as the substring value.
One more question. If you are making a see-through block. What code do you need to add to the block so you don't get the fantastic world hole look ;)?
EDIT:
P.S will you be going through how to make a custom blocks. Like rendering a model made from techne?
I think there may be a method like #isOpaqueBlock or Cube which you can return false, and it should use any transparent textures you have in the texture file.
Your tutorials have been extremely helpful so far, so thank you for your time and effort
I was just wondering if it was possible for me to code some sort of world gen so that ores spawn in specific biomes? I'm currently making a mod with an ore that I want to only spawn in the Ocean biomes.
Thank you!
- Admiral Aqua
Rollback Post to RevisionRollBack
I'm a guy with small modding knowledge but big ideas
If you would like to check out some of my ideas, click on the link(s) below.
Your tutorials have been extremely helpful so far, so thank you for your time and effort
I was just wondering if it was possible for me to code some sort of world gen so that ores spawn in specific biomes? I'm currently making a mod with an ore that I want to only spawn in the Ocean biomes.
Thank you!
- Admiral Aqua
It is possible - I'll have to look into it since I'm not at my computer at the moment.
Ok... My previous error with the SetStepSound method seems like it has misteriously fixed itself, so I've been able to reach the ore generation tutorial. But now the error is back: no sound and the game crashes after a few seconds. Also, all the console messages before the crashing are related to the SoundSystem... I don't know if it's my fault (probably) or something is wrong with my workspace (unlikely...) Here is a pastebin with my console output: http://pastebin.com/qtbE1fwK
Any help would be appreciated
Thanks again!
EDIT: I've noticed a couple of lines (at 15:15:05) about "Attempting connection with missing mods" and my mod name after that... Seems like it's definitely my fault, but I don't know because of what, since I have not touched anything related to sounds afte the SetStepSound thing...
Not entirely. I'll look into the logs for you, and see what I can find. Typically in a dev environment, you'll have several strange errors, so don't automatically point the finger at yourself :).
Ok one question about textures, if my texture is 128x128 which is a multiple of 16 then it should load as a HD texture right? Because many mod items have more than 256 pixels(16x16). I ask because it wont load the 128x128 texture maybe I can port it downward?
Ok one question about textures, if my texture is 128x128 which is a multiple of 16 then it should load as a HD texture right? Because many mod items have more than 256 pixels(16x16). I ask because it wont load the 128x128 texture maybe I can port it downward?
I have no idea what the answer to this is, but please don't use textures larger than 16x16 in your mods. It gets super annoying and doesn't blend in with the Minecraft environment.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Are you changing the directory to the right folder?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumAm I doing something wrong or.. for some reason when I use your code until the end of tutor 5, items and blocks get registered as "Reference.MODID.mymodid_myitemsname". The mymodid and myitemsname are not the names of the things. Am I doing something wrong or is this intended to be fixed in later tutorials? Here's a thing in the log I hope will help:
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: * Illegal extra prefix olivicblocks for name olivicblocks:testItem, invalid registry invocation/invalid name?
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:799)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:143)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:131)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.RegisterHelper.registerItem(RegisterHelper.java:14)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.init.ModItems.init(ModItems.java:11)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.MainClass.preInit(MainClass.java:15)...
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: * Illegal extra prefix olivicblocks for name olivicblocks:testBlock, invalid registry invocation/invalid name?
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerBlock(GameData.java:855)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:223)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:182)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:171)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.RegisterHelper.registerBlock(RegisterHelper.java:10)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.init.ModBlocks.init(ModBlocks.java:11)...
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: ****************************************
[13:28:32] [Client thread/WARN] [FML]: * Illegal extra prefix olivicblocks for name olivicblocks:testBlock, invalid registry invocation/invalid name?
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameData.registerItem(GameData.java:799)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:226)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:182)
[13:28:32] [Client thread/WARN] [FML]: * at cpw.mods.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:171)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.RegisterHelper.registerBlock(RegisterHelper.java:10)
[13:28:32] [Client thread/WARN] [FML]: * at com.hlaaftana.mods.OlivicBlocks.init.ModBlocks.init(ModBlocks.java:11)...
[13:28:32] [Client thread/WARN] [FML]: ****************************************
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI have another complaint with your OreGen tutorial. The OreGen code you gave us has a million errors in it, and I get a crash whenever I try to load a world because of it. Commented all the oregen code out for now. By the way, I would really appreciate it if you added an OreDict tutorial.
Crash log:
[15:02:18] [main/INFO] [GradleStart]: Extra: []
[15:02:18] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/AtaDoruk/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker]
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[15:02:18] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading
[15:02:18] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_40, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_40
[15:02:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
[15:02:18] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
[15:02:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[15:02:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:02:18] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[15:02:20] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[15:02:20] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[15:02:20] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[15:02:20] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
[15:02:20] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
[15:02:20] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[15:02:21] [main/INFO]: Setting user: Player689
[15:02:23] [Client thread/INFO]: LWJGL Version: 2.9.1
[15:02:24] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[15:02:24] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized
[15:02:24] [Client thread/INFO] [FML]: Replaced 183 ore recipies
[15:02:24] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[15:02:25] [Client thread/INFO] [FML]: Searching D:\Files\Minecraft\My Mods\1.7.10\eclipse\mods for mods
[15:02:28] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[15:02:29] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, Reference.MODID] at CLIENT
[15:02:29] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, Reference.MODID] at SERVER
[15:02:29] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Reference.NAME
[15:02:29] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[15:02:29] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
[15:02:29] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[15:02:29] [Client thread/INFO] [FML]: Applying holder lookups
[15:02:29] [Client thread/INFO] [FML]: Holder lookups applied
[15:02:29] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:29] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[15:02:30] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[15:02:30] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:02:30] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[15:02:30] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:30] [Sound Library Loader/INFO]: Sound engine started
[15:02:31] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[15:02:31] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[15:02:32] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[15:02:32] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Reference.NAME
[15:02:32] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[15:02:32] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]: Author: Paul Lamb, www.paulscode.com
[15:02:32] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:32] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:32] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[15:02:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[15:02:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[15:02:32] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[15:02:33] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
[15:02:33] [Sound Library Loader/INFO]: Sound engine started
[15:02:50] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
[15:02:50] [Server thread/INFO]: Generating keypair
[15:02:50] [Server thread/INFO]: Converting map!
[15:02:50] [Server thread/INFO]: Scanning folders...
[15:02:50] [Server thread/INFO]: Total conversion count is 0
[15:02:50] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
[15:02:50] [Server thread/INFO] [FML]: Applying holder lookups
[15:02:50] [Server thread/INFO] [FML]: Holder lookups applied
[15:02:51] [Server thread/INFO] [FML]: Loading dimension 0 (WorldGenTestWorld) ([email protected])
[15:02:51] [Server thread/INFO] [FML]: Loading dimension 1 (WorldGenTestWorld) ([email protected])
[15:02:51] [Server thread/INFO] [FML]: Loading dimension -1 (WorldGenTestWorld) ([email protected])
[15:02:51] [Server thread/INFO]: Preparing start region for level 0
[15:02:51] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.Error: Unresolved compilation problems:
The method generateSurface(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateNether(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateEnd(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
Syntax error, insert ";" to complete BlockStatements
void is an invalid type for the variable generateSurface
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
The method addOreSpawn(Block, World, Random, int, int, int, int, int, int, int, int) is undefined for the type OlivicBlocksWorldGen
void is an invalid type for the variable generateNether
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable generateEnd
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable addOreSpawn
Syntax error on token "(", ; expected
Block cannot be resolved to a type
Syntax error on token ",", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
at com.hlaaftana.mods.OlivicBlocks.generation.OlivicBlocksWorldGen.generate(OlivicBlocksWorldGen.java:16) ~[OlivicBlocksWorldGen.class:?]
at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106) ~[GameRegistry.class:?]
at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:314) ~[ChunkProviderServer.class:?]
at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157) ~[Chunk.class:?]
at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208) ~[ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149) ~[ChunkProviderServer.class:?]
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119) ~[ChunkProviderServer.class:?]
at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79) ~[IntegratedServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) ~[IntegratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
[15:02:51] [Server thread/ERROR]: This crash report has been saved to: D:\Files\Minecraft\My Mods\1.7.10\eclipse\.\crash-reports\crash-2015-03-25_15.02.51-server.txt
[15:02:52] [Server thread/INFO] [FML]: Applying holder lookups
[15:02:52] [Server thread/INFO] [FML]: Holder lookups applied
[15:02:52] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STARTING and forced into state SERVER_STOPPED. Errors may have been discarded.
[15:02:52] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// Why is it breaking
Time: 25.03.2015 15:02
Description: Exception in server tick loop
java.lang.Error: Unresolved compilation problems:
The method generateSurface(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateNether(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
The method generateEnd(World, Random, int, int) is undefined for the type OlivicBlocksWorldGen
Syntax error, insert ";" to complete BlockStatements
void is an invalid type for the variable generateSurface
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
The method addOreSpawn(Block, World, Random, int, int, int, int, int, int, int, int) is undefined for the type OlivicBlocksWorldGen
void is an invalid type for the variable generateNether
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable generateEnd
Syntax error on token "(", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Duplicate local variable x
Syntax error on token ",", ; expected
Duplicate local variable z
Syntax error on token ")", ; expected
void is an invalid type for the variable addOreSpawn
Syntax error on token "(", ; expected
Block cannot be resolved to a type
Syntax error on token ",", ; expected
Duplicate local variable world
Syntax error on token ",", ; expected
Duplicate local variable random
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ",", ; expected
Syntax error on token ")", ; expected
at com.hlaaftana.mods.OlivicBlocks.generation.OlivicBlocksWorldGen.generate(OlivicBlocksWorldGen.java:16)
at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:106)
at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:314)
at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157)
at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208)
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149)
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119)
at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305)
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79)
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_40, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 859724472 bytes (819 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Reference.MODID{Reference.VERSION} [Reference.NAME] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 0 / 8; []
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'
[15:02:52] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@[email protected]# Game crashed! Crash report saved to: #@[email protected]# .\crash-reports\crash-2015-03-25_15.02.51-server.txt
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Class file:
package com.hlaaftana.mods.OlivicBlocks.generation;
import java.util.Random;
import com.hlaaftana.mods.OlivicBlocks.init.ModBlocks;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;
public class OlivicBlocksWorldGen 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 generateSurface(World world, Random random, int x, int z){
addOreSpawn(ModBlocks.oreMagnesium, world, random, x, z, 16, 16, 5 + random.nextInt(3), 12, 48, 128);
}
private void generateNether(World world, Random random, int x, int z){
}
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);
}
}
}
}
Main class:
package com.hlaaftana.mods.OlivicBlocks;
import com.hlaaftana.mods.OlivicBlocks.crafting.Recipes;
import com.hlaaftana.mods.OlivicBlocks.generation.OlivicBlocksWorldGen;
import com.hlaaftana.mods.OlivicBlocks.init.ModBlocks;
import com.hlaaftana.mods.OlivicBlocks.init.ModItems;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = "Reference.MODID", name = "Reference.NAME", version = "Reference.VERSION")
public class MainClass {
OlivicBlocksWorldGen eventWorldGen = new OlivicBlocksWorldGen();
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
ModItems.init();
ModBlocks.init();
GameRegistry.registerWorldGenerator(this.eventWorldGen, 0);
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event){
Recipes.init();
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event){
}
}
In the RegisterHelper class, try removing the modid part in the String.
Hmm, not really. Normally the assetDir wouldn't get installed properly, but it would only spit out warning messages instead of crashing. I'm not too sure what the cause would be, although, see about getting the assetDir pointed in the right direction (google it).
Post your world gen class in a pastebin as it would help tremendously on my end.
Can you post your creative tab classes?
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumhttp://pastebin.com/Zj0pfxQx
Removing it didn't help. Still shows as "Reference.MODID:itemname".
If you need it, here's the RegHelper class: http://pastebin.com/FRPHmsGL
Ok I like your tutorials but at times its REALLY not clear... how do I set my texture name for my item? And you did the same for the naming your block. And also how do you set the name for the texture of your block?
Add an item to the if statement "tabMihbli".
1) The texture name for the item would be the unlocalized name.
2) Blocks can use #setBlockTextureName instead of overriding a method.
3) Use #setBlockTextureName
So, If my item unlocalized name is "godpotatoe" then my I want my substring(4) and the texture named itemgodpotatoe? and for the block it would be substring(5) and blockpotatoe?
I don't have that character in my name but when I moved the Minecraft Modding folder to C: everything worked :3
Substring removes the first 5 (if set to 5) characters from the beginning of the string. An item's unlocalized name would be "item.itemName". Substring removes the first characters, so the unlocalized name would only be "itemName". Block's unlocalized name gets "tile." put in front of it, so it still uses 5 as the substring value.
I think there may be a method like #isOpaqueBlock or Cube which you can return false, and it should use any transparent textures you have in the texture file.
Glad I actually remembered that
yes I did the cd then location of folder, I also tried it with shift right-click and "open command window here"
Your tutorials have been extremely helpful so far, so thank you for your time and effort

I was just wondering if it was possible for me to code some sort of world gen so that ores spawn in specific biomes? I'm currently making a mod with an ore that I want to only spawn in the Ocean biomes.
Thank you!
- Admiral Aqua
I'm a guy with small modding knowledge but big ideas
If you would like to check out some of my ideas, click on the link(s) below.
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/requests-ideas-for-mods/2422063-request-idea-simple-minecraft-better-horse-armors
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumSorry to be a jerk, but you still haven't seen this.
Then the gradle files are not in the right folder. Make sure you are doing everything in the right folder.
It is possible - I'll have to look into it since I'm not at my computer at the moment.
Not entirely. I'll look into the logs for you, and see what I can find. Typically in a dev environment, you'll have several strange errors, so don't automatically point the finger at yourself :).
Alright, I'll look into once I get on my computer.
Ok one question about textures, if my texture is 128x128 which is a multiple of 16 then it should load as a HD texture right? Because many mod items have more than 256 pixels(16x16). I ask because it wont load the 128x128 texture maybe I can port it downward?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI have no idea what the answer to this is, but please don't use textures larger than 16x16 in your mods. It gets super annoying and doesn't blend in with the Minecraft environment.