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

Hi there, I created a custom sword. It seems to work fine, behaves properly in term of its attack power, recipe.

 

But when I look at it in Third Person view from the front, I notice that it is being held weirdly (screenshot attached). When I hold a regular diamond sword, it is being held properly (also screenshot attached).

 

package com.ayclogic.aycfirstmod.item;

import com.mycompany.firstmod.init.ModItemGroup;
import net.minecraft.item.IItemTier;
import net.minecraft.item.Item;
import net.minecraft.item.SwordItem;

public class CustomSword extends SwordItem {
    public CustomSword() {
        super(CustomTier.MATERIAL, 99, -2.0F, new Item.Properties().group(ModItemGroup.MOD_ITEM_GROUP));
    }
}

 

any idea how to fix this?

 

Diamond Sword

DiamondSword.png.c055681a097208883cb23d3a363409f1.png

 

Custom Sword

CustomSword.png.b4a6861f0c117691deb7e3da7aa68347.png

Hello,

Here is the model file of diamond sword

{
    "parent": "item/handheld",
    "textures": {
        "layer0": "item/diamond_sword"
    }
}

So you need to change the "parent" value to "item/handheld" like any sword.

Bye.

Edited by Zeide

@Zeide, you have a good idea, but if this dont work then @gamas you should make a manual model with Blockbench and export it as json model, else if you want the model of the sword then the first idea should work.

New in Modding? == Still learning!

  • Author

Thank you @Zeide, that was it. My model file was like this before

{
  "parent": "item/generated",
  "textures": {
    "layer0": "firstmod:item/invincible_sword"
  }
}

after I changed the "parent":"item/handheld", my custom sword looks good now. Below is the screenshot

CustomSword2.png.9087b195a5067003c503842944e51322.png

Really appreciate your help

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.