Jump to content

When should the Capability system be used?


Zemelua

Recommended Posts

I use a translator, so I'm sorry if my English is unnatural.

Well, as the title says, I'm pretty sure I understand what Capability is, but there are a few things I don't understand.

-Is it correct to understand that Capability is for holding arbitrary data by associating it with an object such as a player or TileEntity?

-In many cases, it seems recommended to use Capability instead of implementing IInventory when creating a TileEntity with an inventory, why? What are the drawbacks of implementing Vanilla's I Inventory and what are the benefits of using Capability?

-Although it overlaps a little with the second question, when implementing Magic Point in Player, of course it is not possible to rewrite the Vanilla Player class, so it is necessary to link the player and Magic Point instance using Capability. I understand that. But should I use Capability for new entity and tile entities as well? Is it even a very simple inheritance of Vanilla's ChestTileEntity?

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.