Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Some Item Textures Will Render, Others Will Not

Featured Replies

Posted

Okay. This is my third time posting on this forum in two days. I feel soooooo dumb right now. I'm obviously new to modding.

 

I am using wuppy's book tutorial to learn to mod with 1.8 and eclipse. I have four custom items right now, which should turn into two items with two metadata tags (meaning, I have a "key" and an item called "sam," because I have "Grey Key" and "Red Key", then I have "Sam Dust" and "Sam Ingot.") My key textures both work fine in game, but I have tried doing the exact same thing with the samingots and samdust in the json, lang, and texture files (changing the appropriate names, of course), and I get nothing but purple-black cubes no matter what I try. Here's an example of my key and sam jsons.

 

keygrey.json

 

{

"parent": "builtin/generated",

"textures": {

"layer0": "nathantestmod:items/keygrey"

},

"display": {

"thirdperson": {

"rotation": [ -90, 0, 0 ],

"translation": [0, 1, -3 ],

"scale": [ 1.7, 1.7, 1.7 ]

}

}

}

 

The red key is the same as this, just with keyred in the layer0 line.

ingotsam.json

 

{

"parent": "builtin/generated",

"textures": {

"layer0": "nathantestmod:items/item.ingotsam"

},

"display": {

"thirdperson": {

"rotation": [ -90, 0, 0 ],

"translation": [0, 1, -3 ],

"scale": [ 1.7, 1.7, 1.7 ]

}

}

}

 

The sam dust file is the same as this with dustsam in the layer0.

 

The json files are all located in assets/nathantestmod/models/item

 

My texture files are named: keygrey.png, keyred.png, ingotsam.png, dustsam.png and are located in assets/nathantestmod/textures/items

 

The lang files I know are fine because the names of all four items are fine in game.

 

The coding to register all the items in the mod class is as follows:

 

@EventHandler

public void PostInit(FMLPostInitializationEvent event)

{

if(event.getSide() == Side.CLIENT)

{

RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();

renderItem.getItemModelMesher().register(key,  0, new ModelResourceLocation(MODID + ":" + ((ItemKey) key).getNameFromDamage(0), "inventory"));

renderItem.getItemModelMesher().register(key,  1, new ModelResourceLocation(MODID + ":" + ((ItemKey) key).getNameFromDamage(1), "inventory"));

renderItem.getItemModelMesher().register(sam,  0, new ModelResourceLocation(MODID + ":" + ((ItemSamGeneric) sam).getNameFromDamage(0), "inventory"));

renderItem.getItemModelMesher().register(sam,  1, new ModelResourceLocation(MODID + ":" + ((ItemSamGeneric) sam).getNameFromDamage(1), "inventory"));

}

 

Sorry about my stupidity in modding. I'm just really slow to learn stuff like this and the tutorial is not as clear as I would like it to be. Thanks for any assistance.

 

 

 

~ Do not go where the path may lead, go instead where there is no path and leave a trail.

--Ralph Waldo Emerson

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.