1

Cannot Texture my Custom Items [1.8]

OneBarRouter's Avatar OneBarRouter2/6/16 8:07 am
1 emeralds 586 7
2/18/2016 2:17 pm
mattyj1231's Avatar mattyj1231
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".
{
"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
Posted by OneBarRouter's Avatar
OneBarRouter
Level 7 : Apprentice Network
9

Create an account or sign in to comment.

7

1
02/18/2016 2:17 pm
Level 4 : Apprentice Ranger
mattyj1231
mattyj1231's Avatar
Great!
1
02/06/2016 5:53 pm
Level 2 : Apprentice Network
Adrenilane_Gaming
Adrenilane_Gaming's Avatar
1
02/06/2016 1:45 pm
Level 7 : Apprentice Network
OneBarRouter
OneBarRouter's Avatar
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
1
02/06/2016 8:42 am
Level 67 : High Grandmaster Modder
HbTextures
HbTextures's Avatar
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
1
02/06/2016 9:48 am
Level 7 : Apprentice Network
OneBarRouter
OneBarRouter's Avatar
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.
1
02/06/2016 11:00 am
Level 67 : High Grandmaster Modder
HbTextures
HbTextures's Avatar
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.
1
02/06/2016 11:30 am
Level 7 : Apprentice Network
OneBarRouter
OneBarRouter's Avatar
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){

}
}
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome