Skip to content

Commit

Permalink
IT WORKS
Browse files Browse the repository at this point in the history
  • Loading branch information
kckarnige committed Jun 21, 2024
1 parent f309e6a commit 34a36be
Show file tree
Hide file tree
Showing 19 changed files with 274 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/main/java/com/kckarnige/slowbronze/SlowBronze.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.kckarnige.slowbronze.item.ModItems;

public class SlowBronze implements ModInitializer {
public static final String MOD_ID = "slowbronze";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

@Override
public void onInitialize() {
LOGGER.info("Hello Fabric world!");
ModItems.registerModItems();
}
}
30 changes: 30 additions & 0 deletions src/main/java/com/kckarnige/slowbronze/item/ModItems.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.kckarnige.slowbronze.item;

import com.kckarnige.slowbronze.SlowBronze;

import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroups;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;

public class ModItems {

public static final Item BRONZE_PLATE = registerItem("bronze_plate", new Item(new Item.Settings()));

private static void addItemToIngredientItemGroup(FabricItemGroupEntries entries) {
entries.add(BRONZE_PLATE);
}

private static Item registerItem (String name, Item item) {
return Registry.register(Registries.ITEM, Identifier.of(SlowBronze.MOD_ID, name), item);
}

public static void registerModItems () {
SlowBronze.LOGGER.info("Registering Bronze Plate item... - " + SlowBronze.MOD_ID);

ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register(ModItems::addItemToIngredientItemGroup);
}
}
Binary file modified src/main/resources/assets/slowbronze/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main/resources/assets/slowbronze/lang/en_gb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"item.slowbronze.bronze_plate": "Bronze Plate"
}
3 changes: 3 additions & 0 deletions src/main/resources/assets/slowbronze/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"item.slowbronze.bronze_plate": "Bronze Plate"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "slowbronze:item/bronze_plate"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_axe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "minecraft:stick"
},
"X": {
"item": "slowbronze:bronze_plate"
}
},
"pattern": [
"XX",
"X#",
" #"
],
"result": {
"count": 1,
"id": "bronze:bronze_axe"
}
}
20 changes: 20 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_boots.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"X": {
"item": "slowbronze:bronze_plate"
},
"C": {
"item": "minecraft:chainmail_boots"
}
},
"pattern": [
"XCX",
"X X"
],
"result": {
"count": 1,
"id": "bronze:bronze_boots"
}
}
21 changes: 21 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_chestplate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"X": {
"item": "slowbronze:bronze_plate"
},
"C": {
"item": "minecraft:chainmail_chestplate"
}
},
"pattern": [
"XCX",
"XXX",
"XXX"
],
"result": {
"count": 1,
"id": "bronze:bronze_chestplate"
}
}
20 changes: 20 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_helmet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"X": {
"item": "slowbronze:bronze_plate"
},
"C": {
"item": "minecraft:chainmail_helmet"
}
},
"pattern": [
"XXX",
"XCX"
],
"result": {
"count": 1,
"id": "bronze:bronze_helmet"
}
}
21 changes: 21 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_hoe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "minecraft:stick"
},
"X": {
"item": "slowbronze:bronze_plate"
}
},
"pattern": [
"XX",
" #",
" #"
],
"result": {
"count": 1,
"id": "bronze:bronze_hoe"
}
}
21 changes: 21 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_leggings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"X": {
"item": "slowbronze:bronze_plate"
},
"C": {
"item": "minecraft:chainmail_leggings"
}
},
"pattern": [
"XXX",
"XCX",
"X X"
],
"result": {
"count": 1,
"id": "bronze:bronze_leggings"
}
}
21 changes: 21 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_pickaxe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "minecraft:stick"
},
"X": {
"item": "slowbronze:bronze_plate"
}
},
"pattern": [
"XXX",
" # ",
" # "
],
"result": {
"count": 1,
"id": "bronze:bronze_pickaxe"
}
}
21 changes: 21 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_shovel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "minecraft:stick"
},
"X": {
"item": "slowbronze:bronze_plate"
}
},
"pattern": [
"X",
"#",
"#"
],
"result": {
"count": 1,
"id": "bronze:bronze_shovel"
}
}
21 changes: 21 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_sickle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "minecraft:stick"
},
"X": {
"item": "slowbronze:bronze_plate"
}
},
"pattern": [
" X ",
" X",
"#X "
],
"result": {
"count": 1,
"id": "bronze:bronze_sickle"
}
}
21 changes: 21 additions & 0 deletions src/main/resources/data/bronze/recipe/bronze_sword.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "minecraft:stick"
},
"X": {
"item": "slowbronze:bronze_plate"
}
},
"pattern": [
"X",
"X",
"#"
],
"result": {
"count": 1,
"id": "bronze:bronze_sword"
}
}
16 changes: 16 additions & 0 deletions src/main/resources/data/slowbronze/recipe/bronze_plate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
"###"
],
"key": {
"#": {
"item": "bronze:bronze_ingot"
}
},
"result": {
"id": "slowbronze:bronze_plate"
}
}

8 changes: 5 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"schemaVersion": 1,
"id": "slowbronze",
"version": "${version}",
"name": "Slow your Roll!: Bronze Compat",
"description": "This is a compatibility mod for the 'Bronze' mod to make in compatible with 'Slow Your Roll!'",
"name": "Slow your Roll: Bronze Compat",
"description": "This is a compatibility mod for the 'Bronze' mod to make in compatible with 'Slow Your Roll'",
"authors": [
"KayoticCarnige"
],
Expand Down Expand Up @@ -32,7 +32,9 @@
"fabricloader": ">=0.15.11",
"minecraft": "~1.21",
"java": ">=21",
"fabric-api": "*"
"fabric-api": "*",
"bronze": ">=1.0.5",
"slowyourroll": ">=1.21-1.0.1"
},
"suggests": {
"another-mod": "*"
Expand Down

0 comments on commit 34a36be

Please sign in to comment.