Jump to content

How to lock items in the armor slot (like Curse of Binding)?


Recommended Posts

There is no good way to do this.

You would have to overwrite the slot in the player inventory with one that overrides Slot#canTakeStack. See the ContainerPlayer constructor for the slot that implements the binding curse.


The best way would be to make a pull request to Forge to add something like Item#isBound.

Edited by diesieben07
Link to comment
Share on other sites

If you are new to modding, you probably shouldn't make a pull request. Also, what is the reason you don't want to use curse of binding? You can change item description, so there won't be any information about it. If it is an item made by you, you can even prevent it from glowing if course of binding is the only enchantment, so the player won't notice anything.

Edited by fcelon
I noticed some errors
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.

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.

  • Create New...

Important Information

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