Jump to content

[1.15] Custom sword is not being held properly


gamas

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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