tutorial:api-lookup
Differences
This shows you the differences between two versions of the page.
tutorial:api-lookup [2021/09/08 18:58] – created technici4n | tutorial:api-lookup [2021/09/28 15:57] (current) – removed technici4n | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======= Fabric API Lookup API ====== | ||
- | |||
- | Let's say that you want to make an energy reader tool that tells you how much energy a block contains. | ||
- | We will use the following interface, and learn how it can be used and implemented: | ||
- | <code java> | ||
- | public interface EnergyContainer { | ||
- | /** | ||
- | * Return how many units of energy this block contains. | ||
- | */ | ||
- | int getStoredEnergy(); | ||
- | } | ||
- | </ | ||
- | |||
- | ===== Using it ===== | ||