generated from Turnip-Labs/bta-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb75368
commit 17cd2a1
Showing
7 changed files
with
50 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
<img align="right" height="128" width="128" alt="" loading="lazy" decoding="async" src="./src/main/resources/icon.png"/> | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/rootenginear/craftablechainmailarmor/CraftableChainmailArmor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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."); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.