As a lot of people will know, the texture manager has been changed a lot, and now a lot of classes are missing and other are completely changed. In this short tutorial I will enum. the changes and teach you how bind a texture with the new system.
- RenderEngine no longer exist. - TextureManager it's rewrotted. - bindTexture NO longer exist. (Only doesn't exist in explicit name, MCP has been changed the name for this)
Now, how to register the texture: (Replacement of bindTexture....)
1.- Create a field with ResourceLocation, example:
private static final ResourceLocation field_test = new ResourceLocation("Your texture URL here");
2.- Register the field:
//Your code *THIS CODE NEEDS TO BE FOR REGISTER GUI/BLOCK OR ITEM TEXTURE
mc.func_110434_K().func_110577_a(field_test);
//More of your code...
Note: This work for Vanilla and ModLoader. Forge uses other methods.
It's easy but it's breaking also all mods that use texture loading.
Another facts:
- Minecraft.java it's now located in net.minecraft.src
- Main.java it's now the main thread.
*sigh* This completely breaks any blocks/items with textures and a custom renderer. No longer can you simply call the block's getIcon method. Instead modders now have to construct their own way to associate textures to blocks/sides/metadata.
*sigh* This completely breaks any blocks/items with textures and a custom renderer. No longer can you simply call the block's getIcon method. Instead modders now have to construct their own way to associate textures to blocks/sides/metadata.
Where do i have to put my textue ?
(in the eclipse/client/bin folder or in the .jar)
PS: do i have to make a pack.mcmeta because the console says (I also don't have any resource packs):
2013-07-13 20:39:08 [CLIENT] [WARNING] Unable to parse metadata section of resourcepack: worldhandler
java.io.FileNotFoundException: .\mods\worldhandler\pack.mcmeta (File not found.)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at net.minecraft.src.FolderResourcePack.func_110591_a(FolderResourcePack.java:22)
at net.minecraft.src.AbstractResourcePack.func_135058_a(AbstractResourcePack.java:55)
at net.minecraft.src.LanguageManager.func_135043_a(LanguageManager.java:38)
at net.minecraft.src.Minecraft.func_110436_a(Minecraft.java:419)
at net.minecraft.src.ModLoader.init(ModLoader.java:811)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:180)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:97)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.src.Minecraft.startGame(Minecraft.java:365)
at net.minecraft.src.Minecraft.func_99999_d(Minecraft.java:676)
at net.minecraft.client.main.Main.main(Main.java:92)
at Start.main(Start.java:11)
2013-07-13 20:39:08 [CLIENT] [INFO] Reloading ResourceManager: Default, mod_WorldHandler, worldhandler
Where do i have to put my textue ?
(in the eclipse/client/bin folder or in the .jar)
PS: do i have to make a pack.mcmeta because the console says (I also don't have any resource packs):
2013-07-13 20:39:08 [CLIENT] [WARNING] Unable to parse metadata section of resourcepack: worldhandler
java.io.FileNotFoundException: .\mods\worldhandler\pack.mcmeta (File not found.)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at net.minecraft.src.FolderResourcePack.func_110591_a(FolderResourcePack.java:22)
at net.minecraft.src.AbstractResourcePack.func_135058_a(AbstractResourcePack.java:55)
at net.minecraft.src.LanguageManager.func_135043_a(LanguageManager.java:38)
at net.minecraft.src.Minecraft.func_110436_a(Minecraft.java:419)
at net.minecraft.src.ModLoader.init(ModLoader.java:811)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:180)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:97)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.src.Minecraft.startGame(Minecraft.java:365)
at net.minecraft.src.Minecraft.func_99999_d(Minecraft.java:676)
at net.minecraft.client.main.Main.main(Main.java:92)
at Start.main(Start.java:11)
2013-07-13 20:39:08 [CLIENT] [INFO] Reloading ResourceManager: Default, mod_WorldHandler, worldhandler
Create a folder called assets and put the textures here (src/minecraft/assets/yourtexture.png)
func_110434_K() is a getter method for render engine. you said it didn't exist. and the func_110577_a() method is bindTexture. its just like 1.5 but the names are changed. you should do some research before you make a tutorial
func_110434_K() is a getter method for render engine. you said it didn't exist. and the func_110577_a() method is bindTexture. its just like 1.5 but the names are changed. you should do some research before you make a tutorial
It will be changed in 1.6.2.
But in 1.6.1 it works (It was the method for bind textures in Inventory, Anvil and ALL GUI's. I will search again and update the tutorial
Edit: Oh, I understand now. But the explicit bindTexture and renderEngine doesn't exist anymore (MCP like change the names)
Edit 2: Edited post. Now better
Edit 3: Wait! Render engine doesn't longer exist. Now it is Texture Manager. You need to research things after posting something, heh.
w8 witch class ?? and and what sould i coppy lol ?
Heh? You've maked a "assets" folder in src/net/minecraft/src?
If not, this it's the problem, and you need to put the textures here.
If you have the texture in other location, good, you need to specify this in-code and you need to have the folder in your mod reobfuscated files (Copy + Paste the folder to reobf/minecraft).
where in-code i dont know were to specify were incode .. and why sould i place my folder into that folder ? how can i make a mod out of that way ??
greets
i jsut did what you said but still dotn get the in-code part but how does it help me putting my asstes foulde in the reobf/minecraft. foulder ?
i told you the textures all do work in eclipse and exported as a mod ..
but only the GUI texture the one that makes te gui have flames and a moving arrow that texture .. only works in eclipse and not exported into mod.zip ... when i load my mod in mc it does load but when i open gui pink/black checkers board texture is showing not the normal gui ..
and ineclipse it does whow my gui texture..
Copy the folder where you have your textures to your mod .zip when reobfuscated
i did that .. but still ONLY the GUI texture wont work .. the rest of all my other textures work in my mod.zip ..
i toght i was clear of that ?? couple of times now ..
when i reobf and compilethmen to a zip including the assets foulder .. with al my textures
when i open my cunstom furnace gui the gui texture shows a pink/black chekcers board ..
but the customfurnace block and all my items .. there textures do work..
only my GUI texturew wont load when i mod.zip thmen .. and in eclipce my gui texture does work ..
IDK, will be a error in the class patch or a error in the modificator of ResourceLocation (the patch of the file)
- RenderEngine no longer exist.
- TextureManager it's rewrotted.
- bindTexture NO longer exist. (Only doesn't exist in explicit name, MCP has been changed the name for this)
Now, how to register the texture: (Replacement of bindTexture....)
1.- Create a field with ResourceLocation, example:
2.- Register the field:
Note: This work for Vanilla and ModLoader. Forge uses other methods.
It's easy but it's breaking also all mods that use texture loading.
Another facts:
- Minecraft.java it's now located in net.minecraft.src
- Main.java it's now the main thread.
Example: https://github.com/K...GuiBrewing.java
Woah woah!
Thanks for creating this write up
To new modders, please be advised that the names func_110434_K() and func_110577_a Will change when MCP updates.
Yep, I forgot this, thank for the information
Woah woah!
At least read the post....
This it's the replacement of bindTexture
Woah woah!
In what?
Woah woah!
Way to screw things up Mojang.
Bolded: Better called fields
Mojang it's the king screwing out mod's code.
Woah woah!
Btw, do you think you could do a full mob tutorial on custom mobs in 1.6.1?
Nop, I don't use them and I don't been learned how-to make it
If I learn it and I can teach how to make custom mobs I will post it here.
Woah woah!
I'm soo bad with Forge things
Woah woah!
(in the eclipse/client/bin folder or in the .jar)
PS: do i have to make a pack.mcmeta because the console says (I also don't have any resource packs):
EDIT: Solved it !
Create a folder called assets and put the textures here (src/minecraft/assets/yourtexture.png)
Woah woah!
Woah woah!
It will be changed in 1.6.2.
But in 1.6.1 it works (It was the method for bind textures in Inventory, Anvil and ALL GUI's. I will search again and update the tutorial
Edit: Oh, I understand now. But the explicit bindTexture and renderEngine doesn't exist anymore (MCP like change the names)
Edit 2: Edited post. Now better
Edit 3: Wait! Render engine doesn't longer exist. Now it is Texture Manager. You need to research things after posting something, heh.
Here you are:
Woah woah!
Do you need to copy the assets folder to your reobfuscated class...
Woah woah!
Heh? You've maked a "assets" folder in src/net/minecraft/src?
If not, this it's the problem, and you need to put the textures here.
If you have the texture in other location, good, you need to specify this in-code and you need to have the folder in your mod reobfuscated files (Copy + Paste the folder to reobf/minecraft).
Woah woah!
Copy the folder where you have your textures to your mod .zip when reobfuscated
Woah woah!
IDK, will be a error in the class patch or a error in the modificator of ResourceLocation (the patch of the file)
Woah woah!
Edit: Nvm i got it