User Tools

Site Tools


tutorial:keybinds

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tutorial:keybinds [2021/02/28 17:18]
sailkite Added a brief guide to the Client entrypoint in an effort to clear up confusion on where to place the subsequent code
tutorial:keybinds [2021/02/28 17:23] (current)
sailkite Fixed a minor formatting issue
Line 37: Line 37:
 </​code>​ </​code>​
  
-So, what are we doing here? Fabric entrypoints for most use cases are designated by implementing a special interface unique to the side or sides that the code in the entrypoint should be run on. For our Client, we simply have our class implement the ''​ClientModInitializer''​ interface. The interface requires us to ''​@Override''​ a single method, ''​onInitializeClient''​. It is in this method (and the equivalents from the other entrypoints respectively) that we will often call methods provided by the Fabric API for easily registering and adding some of the objects and behaviors that we may wish to have in our mod. Of course, we'll also need to update our `fabric.mod.jsonto include our newly created entrypoint, so be sure to consult the [[documentation:​entrypoint|entrypoints page]] if you need a refresher on that process.+So, what are we doing here? Fabric entrypoints for most use cases are designated by implementing a special interface unique to the side or sides that the code in the entrypoint should be run on. For our Client, we simply have our class implement the ''​ClientModInitializer''​ interface. The interface requires us to ''​@Override''​ a single method, ''​onInitializeClient''​. It is in this method (and the equivalents from the other entrypoints respectively) that we will often call methods provided by the Fabric API for easily registering and adding some of the objects and behaviors that we may wish to have in our mod. Of course, we'll also need to update our ''​fabric.mod.json'' ​to include our newly created entrypoint, so be sure to consult the [[documentation:​entrypoint|entrypoints page]] if you need a refresher on that process.
  
 ==== Creating your Keybind ==== ==== Creating your Keybind ====
tutorial/keybinds.txt ยท Last modified: 2021/02/28 17:23 by sailkite