Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package today.theladpack.HotbarReplace;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class HotbarReplace 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 Logger LOGGER = LoggerFactory.getLogger("hotbarreplace");
|
||||
|
||||
@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 from the main class");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package today.theladpack.HotbarReplace.mixin;
|
||||
|
||||
import net.minecraft.client.gui.screen.TitleScreen;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import today.theladpack.HotbarReplace.HotbarReplace;
|
||||
|
||||
@Mixin(TitleScreen.class)
|
||||
public class HotbarReplaceMixin {
|
||||
@Inject(at = @At("HEAD"), method = "init()V")
|
||||
private void init(CallbackInfo info) {
|
||||
HotbarReplace.LOGGER.info("Hello from the HotbarReplace mixin");
|
||||
}
|
||||
}
|
||||
BIN
src/main/resources/assets/hotbarreplace/icon.png
Normal file
BIN
src/main/resources/assets/hotbarreplace/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
35
src/main/resources/fabric.mod.json
Normal file
35
src/main/resources/fabric.mod.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "hotbarreplace",
|
||||
"version": "${version}",
|
||||
|
||||
"name": "HotbarReplace",
|
||||
"description": "Replace blocks in your hotbar when you run out with blocks from your inventory",
|
||||
"authors": [
|
||||
"Adam Macdonald"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://theladpack.today/",
|
||||
"sources": "https://theladpack.today/"
|
||||
},
|
||||
|
||||
"license": "GPLv3",
|
||||
"icon": "assets/hotbarreplace/icon.png",
|
||||
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"today.theladpack.HotbarReplace.HotbarReplace"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"hotbarreplace.mixins.json"
|
||||
],
|
||||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.17",
|
||||
"fabric-api": "*",
|
||||
"minecraft": "~1.19.3",
|
||||
"java": ">=17"
|
||||
}
|
||||
}
|
||||
14
src/main/resources/hotbarreplace.mixins.json
Normal file
14
src/main/resources/hotbarreplace.mixins.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "today.theladpack.HotbarReplace.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
"HotbarReplaceMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user