1
Cannot Texture my Custom Items [1.8]
Hello PMC,
I have just recently gotten into programming mods, and I have run into a very weird problem. I understand that you need to use .json files to render textures on items, and I have set up my files correctly (I think), but the items still won't render. If you can help, please let me know.
Here is the .json file. The item name is test_item, and the mod ID is "tm".
On the left here, you can see my package explorer. Did I put the test_item files in the correct place?
If anyone can help, I will be forever grateful.
Thank you,
Router
I have just recently gotten into programming mods, and I have run into a very weird problem. I understand that you need to use .json files to render textures on items, and I have set up my files correctly (I think), but the items still won't render. If you can help, please let me know.
Here is the .json file. The item name is test_item, and the mod ID is "tm".
{
"parent": "builtin/generated",
"textures": {
"layer0": "tm:items/test_item"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}
On the left here, you can see my package explorer. Did I put the test_item files in the correct place?
If anyone can help, I will be forever grateful.
Thank you,
Router
Create an account or sign in to comment.
7
1
Great!
1
1
Ok, apparently there was something wrong with my .png itself, which is why I couldn't use it...
I copy and pasted a normal egg texture, edited that, and it seemed to work fine... idek XD
I copy and pasted a normal egg texture, edited that, and it seemed to work fine... idek XD
1
If you want to make custom rendered items, you should stick to the old way (because .json sucks), using techne models converted into java files. I'm unsure if this still works in 1.8, but because of the continuous usage of ModelRenderer, this should be no problem.
I found this tutorial, check it out: http://forgetutorials.weebly.com/3d-item-render.html
I found this tutorial, check it out: http://forgetutorials.weebly.com/3d-item-render.html
1
Thank you very much, but seeing as to how I just got started with modding minecraft, I don't understand a reasonable portion of that code. I have also heard from many credible sources that the ONLY way to render textures on custom items is to use .json files. I appreciate your help, and if you have any other information, please reply to this thread. I will check it often.
Also, I will continue looking into the weebly that you posted.
Also, I will continue looking into the weebly that you posted.
1
As I said, this way uses ModelRenderer instances. What are they exactly? Well, default minecraft uses them for all sorts of entities and armor pieces, they are so universal, you can do ANYTHING with them as long as you know how.
You can make:
Custom rendered tile entities
Mobs
Effects
3D inhand rendered items
custom rendered armor models
and even more.
A ModelRenderer consists of following things:
A cube list (for saving all attached cubes)
A child list (for saving al attached ModelRenderers to this ModelRenderer, don't use it)
3 coordinates for rotation points
Rotation Yaw, Pitch and Roll
A texture offset
More stuff you can adjust even after converting the file from Techne. There are plenty of tutorials out there, google what you need and you will probably find it.
You can make:
Custom rendered tile entities
Mobs
Effects
3D inhand rendered items
custom rendered armor models
and even more.
A ModelRenderer consists of following things:
A cube list (for saving all attached cubes)
A child list (for saving al attached ModelRenderers to this ModelRenderer, don't use it)
3 coordinates for rotation points
Rotation Yaw, Pitch and Roll
A texture offset
More stuff you can adjust even after converting the file from Techne. There are plenty of tutorials out there, google what you need and you will probably find it.
1
Ok thank you. I will look into this further. I tried to code the textures in 1.7.10 because you don't need .json files to render, and it still didn't work. Here is my code. Everything is correct.
package onebarrouter.chickenwars;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
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;
import net.minecraft.item.Item;
@Mod(modid = "cw", name = "Chicken Wars", version = "1.0")
public class ChickenWars {
public static Item itemBombEgg;
@EventHandler
public void preInit(FMLPreInitializationEvent event){
//Item/Block init and registering
//Config handling
itemBombEgg = new ItemBombEgg().setUnlocalizedName("ItemBombEgg").setTextureName("cw:itembombegg");
GameRegistry.registerItem(itemBombEgg, itemBombEgg.getUnlocalizedName().substring(5));
}
@EventHandler
public void init(FMLInitializationEvent event){
//Proxy, TileEntity, entity, GUI, and Packet Registering
}
@EventHandler
public void postInit(FMLPostInitializationEvent event){
}
}