Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Good evening,

 

I am very curious about this new thing called "Capabilitys" because I

have two questions I am asking myself all the time:

 

1.) When shall I use Capability, wehen Interfaces?

So my answer to myself is use Interface for Complex things e.g.

Chests and large Inventorys or Complex Machines. Capabilitys seem like

they are for Simple Machines and Simple Inventorys.

 

I know there are way more Capabalitys and I understand they primary

advance to Interfaces because of alle the casting.

 

2.)Is every TileEntity implementing Capabilitys or is it like a need Helper

for us Modders?

In that case I am thinking about things like conduits sending Power, Items

and Fluids. Who gurantees that a Capability is implemented and not an Interface.

 

Thanks in advance.

Pingubro

Here's the documentation on capabilities: http://mcforge.readthedocs.io/en/latest/datastorage/capabilities/. This explains capabilities, and how to use them.

 

1) You should be using capabilities if you want your mod to be able to work with other mods, e.g. have another mods pipes be able to extract and input items into your inventory. You can use interfaces if you are only gonna use it for your own mod, and no other mod has to use it to work with yours.

 

2) Forge has added capability support for the vanilla inventories, e.g. chests and furnaces. Ever modder should support capabilities. The main goal is, for inventories in this case, to say

TileEntity#hasCapability

on ANY

TileEntity

, and if it returns

true

, get it using

TileEntity#getCapabilit

and manipulate that inventory and let the

TileEntity

itself handle everything else.

 

Other people probably know how to explain it better, but this what my general idea of capabilities looks like.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.