Hello all! Welcome to my first tutorial! My friend, HEKKO1235 and I have recently figured out how to do block and item textures for Minecraft Forge 1.6.1!
Okay so let's begin.
First and foremost, let's go to your main mod class.
And let's look at your modID.
For instance, mine is RioV.
@Mod(modid="RioV",name="The Mists of RioV", version="v1.6.0")
This little piece of code will be VERY important.
Next, lets look at the piece of code where we define your block/item.
public static final Block onyxOre = (new BlockCoreOne(TheMistsOfRioV.getUniqueBlockID()-256)).setHardness(6.0F).setResistance(6.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("onyxOre");
The .setUnlocalizedName can be whatever it wants, it doesn't matter for this tutorial.
Next let's go to your block's class file and register the icon, as I'm using one file for multiple blocks, I used if statements to declare the texture. Although if your class file is only supplying one block, don't worry about the if statements.
I have a "init"-class "WorkingSponges" and a class "NewSponge" which is the base class for all sponges.
My problem: The registerIcons() method of the NewSponge class seems to be never executed.
I wrote a "System.out.println()" into this method to see what gets registered, but nothing.
Another question: In the new asset - path for textures, do the filenames of the textures have to be lowercase, too?
I just thought about my signature. I could replace the sponges in there with the "new" black-pink asset-not-found-texture of 1.6.1 and everything was fine....
After following everything from the first post down to the letter the crux of the matter was:
Stitching @PreInit and @Init together so everything is done in @PreInit.
I simply commented out the end of preInit() and the beginning of load().
Now there's a very long preInit() function which does everything and the load() function is gone.
It was directly after preInit() in my code. Load() or @Init seem not to get executed anymore so this function did not do nothing at all, resulting in no output when (not) registering the icons.
And answering my own question from above:
No, the filenames of the graphic files still are in camel-case and do not have to be rewritten to lowercase (yet).
After following everything from the first post down to the letter the crux of the matter was:
Stitching @PreInit and @Init together so everything is done in @PreInit.
I simply commented out the end of preInit() and the beginning of load().
Now there's a very long preInit() function which does everything and the load() function is gone.
It was directly after preInit() in my code. Load() or @Init seem not to get executed anymore so this function did not do nothing at all, resulting in no output when (not) registering the icons.
And answering my own question from above:
No, the filenames of the graphic files still are in camel-case and do not have to be rewritten to lowercase (yet).
Im having a strange issue with this. My console is complaining about missing textures at all even though the textures don't show and i get the pink and black checkered icon in the hot bar.
here is my console output
Jul 4, 2013 10:44:55 PM net.minecraft.launchwrapper.LogWrapper log
INFO: Using tweak class name cpw.mods.fml.common.launcher.FMLTweaker
2013-07-04 22:44:55 [INFO] [ForgeModLoader] Forge Mod Loader version 6.1.34.771 for Minecraft 1.6.1 loading
2013-07-04 22:44:55 [INFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.6.0_51, running on Mac OS X:x86_64:10.8.4, installed at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
2013-07-04 22:44:55 [INFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
2013-07-04 22:44:56 [INFO] [STDOUT] Loaded 39 rules from AccessTransformer config file fml_at.cfg
2013-07-04 22:44:56 [INFO] [STDOUT] Loaded 106 rules from AccessTransformer config file forge_at.cfg
2013-07-04 22:44:57 [SEVERE] [ForgeModLoader] The binary patch set is missing. Things are probably about to go very wrong.
2013-07-04 22:44:57 [INFO] [ForgeModLoader] Launching wrapped minecraft
2013-07-04 22:44:58 [INFO] [Minecraft-Client] Setting user: Player382
2013-07-04 22:44:58 [INFO] [Minecraft-Client] (Session ID is null)
2013-07-04 22:45:00 [INFO] [Minecraft-Client] LWJGL Version: 2.9.0
2013-07-04 22:45:00 [INFO] [Minecraft-Client] Reloading ResourceManager: Default
2013-07-04 22:45:01 [INFO] [STDOUT]
2013-07-04 22:45:01 [INFO] [STDOUT] Starting up SoundSystem...
2013-07-04 22:45:01 [INFO] [STDOUT] Initializing LWJGL OpenAL
2013-07-04 22:45:01 [INFO] [STDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
2013-07-04 22:45:01 [INFO] [MinecraftForge] Attempting early MinecraftForge initialization
2013-07-04 22:45:01 [INFO] [STDOUT] MinecraftForge v8.9.0.771 Initialized
2013-07-04 22:45:01 [INFO] [ForgeModLoader] MinecraftForge v8.9.0.771 Initialized
2013-07-04 22:45:01 [INFO] [STDOUT] OpenAL initialized.
2013-07-04 22:45:01 [INFO] [STDOUT] Replaced 101 ore recipies
2013-07-04 22:45:01 [INFO] [MinecraftForge] Completed early MinecraftForge initialization
2013-07-04 22:45:01 [INFO] [ForgeModLoader] Reading custom logging properties from /Users/chad/Documents/Development/Food Cultures Mod/mcp/jars/config/logging.properties
2013-07-04 22:45:01 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
2013-07-04 22:45:01 [INFO] [STDOUT]
2013-07-04 22:45:01 [INFO] [ForgeModLoader] Searching /Users/chad/Documents/Development/Food Cultures Mod/mcp/jars/mods for mods
2013-07-04 22:45:04 [INFO] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load
2013-07-04 22:45:04 [INFO] [mcp] Activating mod mcp
2013-07-04 22:45:04 [INFO] [FML] Activating mod FML
2013-07-04 22:45:04 [INFO] [Forge] Activating mod Forge
2013-07-04 22:45:04 [INFO] [FoodCultures] Activating mod FoodCultures
2013-07-04 22:45:04 [INFO] [ForgeModLoader] Registering Forge Packet Handler
2013-07-04 22:45:04 [INFO] [ForgeModLoader] Succeeded registering Forge Packet Handler
2013-07-04 22:45:04 [INFO] [ForgeModLoader] Configured a dormant chunk cache size of 0
2013-07-04 22:45:05 [INFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 4 mods
2013-07-04 22:45:05 [WARNING] [Food Cultures] Mod Food Cultures is missing a pack.mcmeta file, things may not work well
2013-07-04 22:45:05 [INFO] [Minecraft-Client] Reloading ResourceManager: Default, FMLFileResourcePack:Food Cultures
2013-07-04 22:45:05 [WARNING] [Minecraft-Client] ResourcePack: ignored non-lowercase namespace: %s in %s
2013-07-04 22:45:06 [INFO] [STDOUT]
2013-07-04 22:45:06 [INFO] [STDOUT] SoundSystem shutting down...
2013-07-04 22:45:06 [INFO] [STDOUT] Author: Paul Lamb, www.paulscode.com
2013-07-04 22:45:06 [INFO] [STDOUT]
2013-07-04 22:45:06 [INFO] [STDOUT]
2013-07-04 22:45:06 [INFO] [STDOUT] Starting up SoundSystem...
2013-07-04 22:45:06 [INFO] [STDOUT] Initializing LWJGL OpenAL
2013-07-04 22:45:06 [INFO] [STDOUT] (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
2013-07-04 22:45:06 [INFO] [STDOUT] OpenAL initialized.
2013-07-04 22:45:06 [INFO] [STDOUT]
2013-07-04 22:45:07 [SEVERE] [Minecraft-Client] Realms: Invalid session id
The only thing that just out at me is this line
2013-07-04 22:45:05 [WARNING] [Food Cultures] Mod Food Cultures is missing a pack.mcmeta file, things may not work well
Im having a strange issue with this. My console is complaining about missing textures at all even though the textures don't show and i get the pink and black checkered icon in the hot bar.
I don't know about pack.mcmeta, but it doesn't effect textures of not having one.
Changing @Init to @PreInit completely broke the mod. It still loads and I did import PreInit but all the items that i made are gone, I put it back to @Init and they show up. I did get mismatched ID issues and I told it to continue loading.found this error
The mod FoodCultures appears to have an invalid method annotation PreInit. This annotation can only apply to methods with argument types [class cpw.mods.fml.common.event.FMLPreInitializationEvent] -it will not be called
EDIT: ok I tried putting the item declarations in the Load function and separating them from the LanguageRegistry,GameRegistry and Recipes in a function called something(to test) and then called that function within the Load function and now I get this...
and in the console is is saying all the items are missing
EDIT: ok I tried putting the item declarations in the Load function and separating them from the LanguageRegistry,GameRegistry and Recipes in a function called something(to test) and then called that function within the Load function and now I get this...
and in the console is is saying all the items are missing
Keep the load and preInit as they were before.
Move the item declarations to preInit.
It works for me.
Okay so let's begin.
First and foremost, let's go to your main mod class.
And let's look at your modID.
For instance, mine is RioV.
This little piece of code will be VERY important.
Next, lets look at the piece of code where we define your block/item.
The .setUnlocalizedName can be whatever it wants, it doesn't matter for this tutorial.
Next let's go to your block's class file and register the icon, as I'm using one file for multiple blocks, I used if statements to declare the texture. Although if your class file is only supplying one block, don't worry about the if statements.
This is where your modID comes in. When you put your modID:*textureName* the directory is now this:
mcp/src/minecraft/assets/riov/textures/blocks|items/(png files such as onyxOre)
Notice I put riov in the directory as lowercase, if you use uppercase for that portion minecraft will completely ignore it and refuse to use it.
I think thats it really, hope I helped!
[Minecraft-Client] Using missing texture, unable to load: toolsnfood:textures/items/emeraldSword.png
I put the texture in \Forge 1.6.1\mcp\src\assets\toolsnfood\textures\items\emeraldSword.png
Code:
Edit: It works fine now. I put the texture in:
\mcp\src\minecraft\assets\toolsnfood\textures\items\textureFile.png
Oops! My bad, forgot to add the minecraft part in.
You make it.
The folder is called "blocks" instead of "items." So, basically, in the texture folder, there are two folders, blocks and items.
This was the only thing making my mod unavaible for 1.6.1
=D back to adding new features.
Glad I could help.
My problem: The registerIcons() method of the NewSponge class seems to be never executed.
I wrote a "System.out.println()" into this method to see what gets registered, but nothing.
Source (old source for 1.5.2)
Another question: In the new asset - path for textures, do the filenames of the textures have to be lowercase, too?
I just thought about my signature. I could replace the sponges in there with the "new" black-pink asset-not-found-texture of 1.6.1 and everything was fine....
Don't worry - be happy!
In directory: mcp/src/minecraft/bricks/textures/items/*.png
And yes, my ModID is "Bricks".
Stitching @PreInit and @Init together so everything is done in @PreInit.
I simply commented out the end of preInit() and the beginning of load().
Now there's a very long preInit() function which does everything and the load() function is gone.
It was directly after preInit() in my code. Load() or @Init seem not to get executed anymore so this function did not do nothing at all, resulting in no output when (not) registering the icons.
And answering my own question from above:
No, the filenames of the graphic files still are in camel-case and do not have to be rewritten to lowercase (yet).
@Mod.EventHandler
here is my console output
The only thing that just out at me is this line
If your wondering how I coded my tutorials I follows this guys instructions -> http://www.youtube.com/channel/UCx1y0Z2X5WPzTyPEYa1Onog
Move items to preInit.
I don't know about pack.mcmeta, but it doesn't effect textures of not having one.
Changing @Init to @PreInit completely broke the mod. It still loads and I did import PreInit but all the items that i made are gone, I put it back to @Init and they show up. I did get mismatched ID issues and I told it to continue loading.found this error
and in the console is is saying all the items are missing
Keep the load and preInit as they were before.
Move the item declarations to preInit.
It works for me.
So you mean have a function PreInit? Or have 2 load functions. 1 PreInit and the other Init?
Exactly.
Hello!