I never had forge before, I am a first-time-installer and installed it, nevest version and still experience it.
Changed attack key to LeftCtrl key, not mouse button. How can I fix that there?
No attack problems in Minecraft Vanilla version with attack key set to LeftCtrl.
That is one use case, yes. Capabilities attached to "foreign objects" such as the player entity using AttachCapabilityEvent can be used to store data associated with that object.
You're referring to IItemHandler here, one capability. The benefits of using capabilities over directly implemented interfaces on TileEntities (or other objects) are mostly decoupling and code-reuse. Instead of implementing the inventory mechanics from scratch every time you simply create a new ItemStackHandler, which is a ready-made inventory implementation. Additionally, you are not forced to implement the interface yourself, getCapability can return whatever instance you want. It could even delegate to some other tile entity nearby, or whatever.
I think I answered this above already.
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?