Add Stick/Stick Recipies #2

Merged
abird356 merged 5 commits from feature/stick-items into main 2025-05-03 16:50:37 +00:00
41 changed files with 248 additions and 2 deletions
Showing only changes of commit 7e849e443d - Show all commits

No files matched your search

@@ -31,7 +31,7 @@ public class ModItemGroups {
*/
public static final ItemGroup MAGIC_GROUP = FabricItemGroup.builder()
.icon(() -> new ItemStack(ModItems.TESTING_POWDER)) // The item to show as the group's icon. Can be anything.
.displayName(Text.translatable("magic-mod.magic_group")) // Gets the name from the translation file in the mod resources.
.displayName(Text.translatable("magic_mod.magic_group")) // Gets the name from the translation file in the mod resources.
.build();
@@ -47,7 +47,19 @@ public class ModItemGroups {
Registry.register(Registries.ITEM_GROUP, MAGIC_GROUP_KEY, MAGIC_GROUP);
ItemGroupEvents.modifyEntriesEvent(MAGIC_GROUP_KEY)
.register(itemGroup -> {
itemGroup.add(ModItems.ACACIA_STICK);
itemGroup.add(ModItems.BAMBOO_STICK);
itemGroup.add(ModItems.BIRCH_STICK);
itemGroup.add(ModItems.CHERRY_STICK);
itemGroup.add(ModItems.CRIMSON_STICK);
itemGroup.add(ModItems.DARK_OAK_STICK);
itemGroup.add(ModItems.JUNGLE_STICK);
itemGroup.add(ModItems.MANGROVE_STICK);
itemGroup.add(ModItems.OAK_STICK);
itemGroup.add(ModItems.PALE_OAK_STICK);
itemGroup.add(ModItems.SPRUCE_STICK);
itemGroup.add(ModItems.TESTING_POWDER);
itemGroup.add(ModItems.WARPED_STICK);
});
MagicMod.LOGGER.info("Item group initialization complete");
@@ -22,6 +22,78 @@ public class ModItems {
.food(ModFoodComponents.TESTING_POWDER_COMPONENT, ModConsumableComponents.TESTING_POWDER_NIGHTVIS)
);
public static final Item ACACIA_STICK = register(
"acacia_stick",
Item::new,
new Item.Settings()
);
public static final Item BAMBOO_STICK = register(
"bamboo_stick",
Item::new,
new Item.Settings()
);
public static final Item BIRCH_STICK = register(
"birch_stick",
Item::new,
new Item.Settings()
);
public static final Item CHERRY_STICK = register(
"cherry_stick",
Item::new,
new Item.Settings()
);
public static final Item CRIMSON_STICK = register(
"crimson_stick",
Item::new,
new Item.Settings()
);
public static final Item DARK_OAK_STICK = register(
"dark_oak_stick",
Item::new,
new Item.Settings()
);
public static final Item JUNGLE_STICK = register(
"jungle_stick",
Item::new,
new Item.Settings()
);
public static final Item MANGROVE_STICK = register(
"mangrove_stick",
Item::new,
new Item.Settings()
);
public static final Item OAK_STICK = register(
"oak_stick",
Item::new,
new Item.Settings()
);
public static final Item PALE_OAK_STICK = register(
"pale_oak_stick",
Item::new,
new Item.Settings()
);
public static final Item SPRUCE_STICK = register(
"spruce_stick",
Item::new,
new Item.Settings()
);
public static final Item WARPED_STICK = register(
"warped_stick",
Item::new,
new Item.Settings()
);
public static Item register(String name, @NotNull Function<Item.Settings, Item> factory, Item.Settings settings) {
// Create the item's registry key (get it from the ITEM registry)
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/acacia_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/bamboo_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/birch_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/cherry_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/crimson_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/dark_oak_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/jungle_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/mangrove_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/oak_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/pale_oak_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/spruce_stick"
}
}
@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "magic_mod:item/warped_stick"
}
}
@@ -1,4 +1,16 @@
{
"item.magic_mod.testing_powder": "Testing Powder (edible)",
"item.magic_mod.acacia_stick": "Acacia Stick",
"item.magic_mod.bamboo_stick": "Bamboo Stick",
"item.magic_mod.birch_stick": "Birch Stick",
"item.magic_mod.cherry_stick": "Cherry Stick",
"item.magic_mod.crimson_stick": "Crimson Stick",
"item.magic_mod.dark_oak_stick": "Dark Oak Stick",
"item.magic_mod.jungle_stick": "Jungle Stick",
"item.magic_mod.mangrove_stick": "Mangrove Stick",
"item.magic_mod.oak_stick": "Oak Stick",
"item.magic_mod.pale_oak_stick": "Pale Oak Stick",
"item.magic_mod.spruce_stick": "Spruce Stick",
"item.magic_mod.warped_stick": "Warped Stick",
"magic_mod.magic_group": "Testing Mod Items"
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/acacia_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/bamboo_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/birch_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/cherry_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/crimson_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/dark_oak_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/jungle_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/mangrove_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/oak_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/pale_oak_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/spruce_stick"
}
}
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "magic_mod:item/warped_stick"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

@@ -6,7 +6,7 @@
"/ "
],
"key": {
"/": "minecraft:stick"
"/": "#magic_mod:sticks"
},
"result": {
"id": "magic_mod:testing_powder",
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"magic_mod:acacia_stick"
]
}