-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the example actually do something
Not much, but it at least shows what to expect
- Loading branch information
Showing
2 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package example; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
import org.dimdev.rift.listener.BootstrapListener; | ||
import org.dimdev.rift.listener.MinecraftStartListener; | ||
|
||
import net.minecraft.init.Items; | ||
|
||
/** | ||
* The example mod listener, as defined in the riftmod.json file | ||
* | ||
* As many more as wanted can be made by adding their full names in the riftmod.json file | ||
* | ||
* @author Reisse, Chocohead | ||
*/ | ||
public class ExampleListener implements MinecraftStartListener, BootstrapListener { | ||
private static final Logger LOGGER = LogManager.getLogger(); | ||
|
||
@Override | ||
public void onMinecraftStart() { | ||
//Minecraft has started but hasn't registered any blocks or items | ||
//Prime time for loading a config if you need one | ||
LOGGER.info("Minecraft starting"); | ||
} | ||
|
||
//Blocks can be added by implementing BlockAdder, Items from ItemAdder etc. | ||
//See open sourced mods such as HalfLogs for reference | ||
|
||
@Override | ||
public void afterVanillaBootstrap() { | ||
//Minecraft has now finished Bootstrap so all blocks and items are registered | ||
//You probably won't need to listen to this normally. | ||
LOGGER.info("Minecraft loaded: " + Items.CARROT_ON_A_STICK); | ||
} | ||
} |