-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
basic 2 items
1 parent
0a998bd
commit 455c27a
Showing
8 changed files
with
59 additions
and
1 deletion.
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
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,11 @@ | ||
package net.dylan.magicmod.block; | ||
|
||
import net.dylan.magicmod.MagicMod; | ||
|
||
public class ModBlocks { | ||
|
||
public static void registerModBlocks() { | ||
MagicMod.LOGGER.info("Registering Blocks for " + MagicMod.MOD_ID); | ||
|
||
} | ||
} |
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,30 @@ | ||
package net.dylan.magicmod.item; | ||
|
||
import net.dylan.magicmod.MagicMod; | ||
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemGroup; | ||
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 Item MAGIC_SWORD = registerItem("magic_sword", new Item(new Item.Settings())); | ||
public static Item MAGIC_CRYSTAL = registerItem("magic_crystal", new Item(new Item.Settings())); | ||
|
||
private static Item registerItem(String name, Item item) { | ||
return Registry.register(Registries.ITEM, Identifier.of(MagicMod.MOD_ID, name), item); | ||
} | ||
|
||
public static void registerModItems() { | ||
MagicMod.LOGGER.info("Registering Items for " + MagicMod.MOD_ID); | ||
|
||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.COMBAT).register(entries -> { | ||
entries.add(MAGIC_SWORD); | ||
}); | ||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register(entries -> { | ||
entries.add(MAGIC_CRYSTAL); | ||
}); | ||
} | ||
} |
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,4 @@ | ||
{ | ||
"item.magicmod.magic_sword": "Magic Sword", | ||
"item.magicmod.magic_crystal": "Magic Crystal" | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/magicmod/models/item/magic_crystal.json
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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0":"magicmod:item/magic_crystal" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/magicmod/models/item/magic_sword.json
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,6 @@ | ||
{ | ||
"parent": "minecraft:item/handheld", | ||
"textures": { | ||
"layer0":"magicmod:item/magic_sword" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.