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.

Featured Replies

Posted

I'm trying to load my custom item model (located at <resourcepack>/assets/tesitems/models/item/iron_sword.json), I am using resource pack for fast reloading, but it doesn't work. I don't see any exceptions, so I think model is getting loaded. Here is model code:

{
    "parent": "tesitems:item/handheld",
    "textures": {
        "layer0": "tesitems:items/iron_sword"
    },
    "display": {
        "thirdperson": {
            "rotation": [ 0, 90, -35 ],
            "translation": [ 0, 1.25, -3.5 ],
            "scale": [ 0.85, 0.85, 0.85 ]
        },
        "firstperson": {
            "rotation": [ 0, -135, 25 ],
            "translation": [ 0, 4, 2 ],
            "scale": [ 1.7, 1.7, 1.7 ]
        }
    }
}

, handheld (in the same folder):

{
    "parent": "builtin/generated",
    "display": {
        "thirdperson_righthand": {
            "rotation": [ 0, 90, -35 ],
            "translation": [ 0, 1.25, -3.5 ],
            "scale": [ 0.85, 0.85, 0.85 ]
        },
        "firstperson_righthand": {
            "rotation": [ 0, -135, 25 ],
            "translation": [ 0, 4, 2 ],
            "scale": [ 1.7, 1.7, 1.7 ]
        },
        "thirdperson_lefthand": {
            "rotation": [ 0, 90, -35 ],
            "translation": [ 0, 1.25, -3.5 ],
            "scale": [ 0.85, 0.85, 0.85 ]
        },
        "firstperson_lefthand": {
            "rotation": [ 0, -135, 25 ],
            "translation": [ 0, 4, 2 ],
            "scale": [ 1.7, 1.7, 1.7 ]
        }
    }
}

, registering:

    private static void registerWeapon(Weapon weapon, String name) {
        weapon.setRegistryName(name);
        weapon.setUnlocalizedName(name);
        GameRegistry.register(weapon);
    }

, Weapon extends ItemSword. Texture is in <resourcepack>/assets/tesitems/textures/items/. What had I missed?

Mods are already resource packs, you can build your project in your IDE and then reload resources in-game any time you add/change a resource.

 

There are no

thirdperson

or

firstperson

display transformations in 1.9+ (they were split into left/right hand), so your

iron_sword

model is using the transformations specified by your

handheld

model.

 

Minecraft will automatically load a model for each

Item

, but it won't actually use that model unless you tell it to by calling

ModelLoader.setCustomModelResourceLocation

/

setCustomMeshDefinition

in preInit (only on the client side).

 

If that's not the issue, upload your FML log (logs/fml-client-latest.log) to Gist and link it here. It should tell you what went wrong.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.