fixed some stuff
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
package net.fabricmc.fishplex;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -8,14 +13,17 @@ public class Aspects implements ModInitializer {
|
||||
// This logger is used to write text to the console and the log file.
|
||||
// It is considered best practice to use your mod id as the logger's name.
|
||||
// That way, it's clear which mod wrote info, warnings, and errors.
|
||||
public static final Item ANEMO_FEATHER = new Item(new FabricItemSettings());
|
||||
public static final Item PYRO_FIRE = new Item(new FabricItemSettings());
|
||||
public static final Item HYDRO_KELP = new Item(new FabricItemSettings());
|
||||
public static final Logger LOGGER = LogManager.getLogger("aspects");
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
||||
// However, some things (like resources) may still be uninitialized.
|
||||
// Proceed with mild caution.
|
||||
|
||||
LOGGER.info("Hello Fabric world!");
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
Registry.register(Registry.ITEM, new Identifier("aspects", "anemo_feather"), ANEMO_FEATHER);
|
||||
Registry.register(Registry.ITEM, new Identifier("aspects", "pyro_fire"), PYRO_FIRE);
|
||||
Registry.register(Registry.ITEM, new Identifier("aspects", "hydro_kelp"), HYDRO_KELP);
|
||||
LOGGER.info("Hello from Aspects :D");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
public class AspectsMixin {
|
||||
@Inject(at = @At("HEAD"), method = "init()V")
|
||||
private void init(CallbackInfo info) {
|
||||
Aspects.LOGGER.info("This line is printed by an example mod mixin!");
|
||||
Aspects.LOGGER.info("Hello from Aspects! :D");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user