Posted May 24, 201510 yr I've been trying to texture my item (unsuccessfully) and for whatever reason the model thinks that it's a block. I don't have any code that says it's an item block, but I still have no idea how the json texturing system works. This is my json file: { "parent": "builtin/generated", "textures": { "layer0": "Ancients:items/Rubble" }, "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 ] } } } Also, how can I texture it? I can't seem to figure it out. The proud(ish) developer of Ancients
May 24, 201510 yr It will look like an untextured block until the .JSON file is used to reference the texture. In your assets folder you need another folder called models, in the models folder you need a folder called item, place the Rubble.JSON file in that item folder.
May 24, 201510 yr Author I did originally, and it still doesn't work. The proud(ish) developer of Ancients
May 24, 201510 yr You should better watch for a tutorial of How to create items in 1.8 since you seem really confused sir
May 24, 201510 yr Author Can you not create items the same as in 1.7? (I realize the texturing is different) The proud(ish) developer of Ancients
May 24, 201510 yr This is my food class right now: package com.ProfitOrange.moshiz.init; import com.ProfitOrange.moshiz.MoShizMain; import com.ProfitOrange.moshiz.Reference; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemFood; import net.minecraftforge.fml.common.registry.GameRegistry; public class MoShizFoods { public static Item beefSandwich; public static void init() { beefSandwich = new ItemFood(8, 0.8F, false).setUnlocalizedName("beefSandwich").setCreativeTab(MoShizMain.tabGems); } public static void register() { GameRegistry.registerItem(beefSandwich, beefSandwich.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(beefSandwich); } public static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));; } } Then my preInit method in my main class: @EventHandler public void preInit(FMLPreInitializationEvent event) { MoShizFoods.init(); MoShizFoods.register(); } In my ClientProxy class: @Override public void registerRenders() { MoShizFoods.registerRenders(); }
May 24, 201510 yr Author I essentially have that exact code, except my code doesn't have the extra functions (I make really bad code structure). The proud(ish) developer of Ancients
May 25, 201510 yr Author I got it to work after changing random file locations and code. The proud(ish) developer of Ancients
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.