I fucked around and found out

This commit is contained in:
nelle 2023-12-06 02:48:11 -07:00
parent 06151db5be
commit c8e0d68417
6 changed files with 16 additions and 35 deletions

View file

@ -1,6 +1,6 @@
# TODO
- [ ] Creative Tab
- [ ] Block Registry
- [ ] Achievements
- [X] Achievements
- [ ] Crowbar Texture
- [ ] Crafting Recipes
- [X] Crafting Recipes

View file

@ -1,16 +0,0 @@
package xyz.limepot.block_life.mixin;
import net.minecraft.client.gui.screen.TitleScreen;
import xyz.limepot.block_life.BlockLife;
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;
@Mixin(TitleScreen.class)
public class TitleScreenMixin {
@Inject(method = "init", at = @At("TAIL"))
public void blockLife$onInit(CallbackInfo ci) {
BlockLife.INSTANCE.getLOGGER().info(" ");
}
}

View file

@ -11,8 +11,7 @@ object BlockLife : ModInitializer {
val LOGGER: Logger = LoggerFactory.getLogger("Block-Life")
override fun onInitialize(mod: ModContainer) {
LOGGER.info("Howdy Quilt Kotlin world from {}!", mod.metadata()?.name())
LOGGER.info("Howdy Quilt-Kotlin world from {}!", mod.metadata()?.name())
ModItems()
}
}

View file

@ -9,21 +9,20 @@ import org.quiltmc.qsl.item.setting.api.QuiltItemSettings
import xyz.limepot.block_life.BlockLife
class ModItems {
init {
val CROWBAR: Item = registerItem(
"crowbar",
CrowbarItem(2.4F,
1F,
ModToolMaterials.IRON,
BlockTags.AXE_MINEABLE,
/*TODO: Setup our own custom mineable list, */
QuiltItemSettings())
)
}
val CROWBAR: Item =
registerItem(
"crowbar",
CrowbarItem(4.5F,
-1F,
ModToolMaterials.IRON,
BlockTags.AXE_MINEABLE,
/*TODO: Setup our own custom mineable list, */
QuiltItemSettings())
)
//registry template
private fun registerItem(name: String, item: Item): Item {
return Registry.register<Item, Item>(Registries.ITEM, Identifier(BlockLife.MOD_ID, name), item)
BlockLife.LOGGER.debug("Registering " + name)
return Registry.register<Item, Item>(Registries.ITEM, Identifier(BlockLife.MOD_ID, name), item)
}
}

View file

@ -1,11 +1,10 @@
{
"required": true,
"required": false,
"minVersion": "0.8",
"package": "xyz.limepot.block_life.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [],
"client": [
"TitleScreenMixin"
],
"injectors": {
"defaultRequire": 1

View file

@ -22,7 +22,7 @@
"frame": "task",
"hidden": false,
"icon": {
"item": "minecraft:dirt"
"item": "block_life:crowbar"
},
"show_toast": true,
"title": {