diff --git a/README.md b/README.md index dfd3d79..8347379 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,8 @@ -# Playground +# Craftable Chainmail Armor -This is the beginning of awesome mods! +Craft chainmail armors from chainlinks. > **Important** > Required [Babric](https://github.com/Turnip-Labs/babric-instance-repo/releases) to run the mod. - -## Features - -- Feature #1 -- Feature #2 -- Feature #3 diff --git a/gradle.properties b/gradle.properties index 3b645be..dbc8f87 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,6 +10,6 @@ loader_version=0.14.19-babric.1-bta # halplibe_version=2.3.0 # Mod -mod_version=1.0.0 +mod_version=1.0.2 mod_group=rootenginear -mod_name=playground +mod_name=craftablechainmailarmor diff --git a/src/main/java/rootenginear/craftablechainmailarmor/CraftableChainmailArmor.java b/src/main/java/rootenginear/craftablechainmailarmor/CraftableChainmailArmor.java new file mode 100644 index 0000000..fa339a4 --- /dev/null +++ b/src/main/java/rootenginear/craftablechainmailarmor/CraftableChainmailArmor.java @@ -0,0 +1,40 @@ +package rootenginear.craftablechainmailarmor; + +import net.fabricmc.api.ModInitializer; +import net.minecraft.core.block.Block; +import net.minecraft.core.crafting.CraftingManager; +import net.minecraft.core.item.Item; +import net.minecraft.core.item.ItemStack; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class CraftableChainmailArmor implements ModInitializer { + public static final Logger LOGGER = LoggerFactory.getLogger("craftablechainmailarmor"); + + static { + // Prevent Java compiler to remove unused import + Block $ = Block.blockOlivine; + } + + public static final CraftingManager craftingManager = CraftingManager.getInstance(); + + @Override + public void onInitialize() { + craftingManager.addRecipe(new ItemStack(Item.armorHelmetChainmail, 1, 217), "AAA", + "A A", + 'A', Item.chainlink); + craftingManager.addRecipe(new ItemStack(Item.armorChestplateChainmail, 1, 239), "A A", + "AAA", + "AAA", + 'A', Item.chainlink); + craftingManager.addRecipe(new ItemStack(Item.armorLeggingsChainmail, 1, 231), "AAA", + "A A", + "A A", + 'A', Item.chainlink); + craftingManager.addRecipe(new ItemStack(Item.armorBootsChainmail, 1, 224), "A A", + "A A", + 'A', Item.chainlink); + + LOGGER.info("Craftable Chainmail Armor initialized."); + } +} diff --git a/src/main/java/rootenginear/playground/Playground.java b/src/main/java/rootenginear/playground/Playground.java deleted file mode 100644 index 660347b..0000000 --- a/src/main/java/rootenginear/playground/Playground.java +++ /dev/null @@ -1,15 +0,0 @@ -package rootenginear.playground; - -import net.fabricmc.api.ModInitializer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class Playground implements ModInitializer { - public static final String MOD_ID = "playground"; - public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); - - @Override - public void onInitialize() { - LOGGER.info("Playground initialized."); - } -} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 4d34a7b..ad51266 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,28 +1,25 @@ { "schemaVersion": 1, - "id": "playground", + "id": "craftablechainmailarmor", "version": "${version}", - "name": "Playground", - "description": "This is the beginning of awesome mods!", + "name": "Craftable Chainmail Armor", + "description": "Craft chainmail armors from chainlinks.", "authors": [ "rootEnginear" ], "icon": "icon.png", "contact": { - "homepage": "https://github.com/rootEnginear/bta-rootenginear-mods", - "sources": "https://github.com/rootEnginear/bta-rootenginear-mods", + "homepage": "https://github.com/rootEnginear/bta-rootenginear-mods/tree/craftable-chainmail-armor", + "sources": "https://github.com/rootEnginear/bta-rootenginear-mods/tree/craftable-chainmail-armor", "issues": "https://github.com/rootEnginear/bta-rootenginear-mods/issues" }, "license": "CC0-1.0", "environment": "*", "entrypoints": { "main": [ - "rootenginear.playground.Playground" + "rootenginear.craftablechainmailarmor.CraftableChainmailArmor" ] }, - "mixins": [ - "playground.mixins.json" - ], "depends": { "fabricloader": ">=0.13.3" } diff --git a/src/main/resources/icon.png b/src/main/resources/icon.png index df525b9..c33b832 100644 Binary files a/src/main/resources/icon.png and b/src/main/resources/icon.png differ diff --git a/src/main/resources/playground.mixins.json b/src/main/resources/playground.mixins.json deleted file mode 100644 index 97606d0..0000000 --- a/src/main/resources/playground.mixins.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "required": true, - "minVersion": "0.8", - "package": "rootenginear.playground.mixin", - "compatibilityLevel": "JAVA_8", - "mixins": [ - ], - "injectors": { - "defaultRequire": 1 - } -}