Add missed files

This commit is contained in:
2022-05-12 00:20:18 +02:00
parent 16c24ce795
commit a49903cc69
40 changed files with 728 additions and 367 deletions

View File

@@ -1,34 +1,11 @@
package com.example.examplemod;
package me.hypherionmc.craterlib;
import me.hypherionmc.craterlib.Constants;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.fml.common.Mod;
@Mod(Constants.MOD_ID)
public class ExampleMod {
public class CraterLib {
public ExampleMod() {
public CraterLib() {
// This method is invoked by the Forge mod loader when it is ready
// to load your mod. You can access Forge and Common code in this
// project.
// Use Forge to bootstrap the Common mod.
Constants.LOG.info("Hello Forge world!");
CommonClass.init();
// Some code like events require special initialization from the
// loader specific code.
MinecraftForge.EVENT_BUS.addListener(this::onItemTooltip);
}
// This method exists as a wrapper for the code in the Common project.
// It takes Forge's event object and passes the parameters along to
// the Common listener.
private void onItemTooltip(ItemTooltipEvent event) {
CommonClass.onItemTooltip(event.getItemStack(), event.getFlags(), event.getToolTip());
}
}