Jump to content

Recommended Posts

Posted

I try to make my eleven year old son an enthusiastic programmer, so I started helping him to make a mod. (I'm a developer but definitely no game at all).

 

My problem is, the bow can shot, but has no arrow in the bow, but the textures has it.

 

The bow is really basic https://github.com/VincentZocker/VincModOp/blob/master/src/main/java/info/vincent/vincmodop/WitherBow.java

 

public class WitherBow extends BowItem {
    public WitherBow() {
        super(new Item.Properties().group(ModItemGroups.weaponsItemGroup));
        setRegistryName(Reference.REIGSTRY_NAME_WITHERBOW_ITEM);
    }
}

 

it has the assets https://github.com/VincentZocker/VincModOp/tree/master/src/main/resources/assets/vincmod/models/item

and the textures https://github.com/VincentZocker/VincModOp/tree/master/src/main/resources/assets/vincmod/textures/item

the log shows me no issue

 

I'm out of ideas, and I hope someone can me point me to my issue. Thank you !

 

Posted (edited)

If i am not mistaken you have to register a custom property for your bow (because the vanilla properties for the bow works only with Items.BOW, so the vanilla bow). You can do that with the ItemModelProperties.registerProperty method (if you have outdated mappings it probably won't be named like that for you). You can see how the properties "pulling" and "pull" for the vanilla bow are defined inside the ItemModelProperties class. If you want your bow to behave exactly like the vanilla one you just need to register two new properties (which are also "pull" and "pulling" as you defined them in your item model json) and use the same code as vanilla does, while linking those properties to your custom bow

Edited by Beethoven92

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

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.