-
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.
Aprendendo a colocar itens no minecraft
- Loading branch information
Showing
7 changed files
with
46 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,27 @@ | ||
package john.mod.item; | ||
|
||
import john.mod.PrimeiroMod; | ||
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 PINK_GARNET = registerItem("pink_garnet", new Item(new Item.Settings())); | ||
public static final Item RAW_PINK_GARNET = registerItem("raw_pink_garnet", new Item(new Item.Settings())); //REPLICAR PRA CRIAR NOVOS ITEMS | ||
|
||
private static Item registerItem(String name, Item item) { | ||
return Registry.register(Registries.ITEM, Identifier.of(PrimeiroMod.MOD_ID, name), item); | ||
} | ||
|
||
public static void registerModItems() { | ||
PrimeiroMod.LOGGER.info("Registering Mod Items for " + PrimeiroMod.MOD_ID); | ||
|
||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register(fabricItemGroupEntries -> { | ||
fabricItemGroupEntries.add(PINK_GARNET); | ||
fabricItemGroupEntries.add(RAW_PINK_GARNET); //REPLICAR PRA CRIAR NOVOS ITEMS | ||
}); | ||
} | ||
} |
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,5 @@ | ||
{ | ||
"item.primeiro-mod.pink_garnet": "Pink Garnet", | ||
"item.primeiro-mod.raw_pink_garnet": "Raw Pink Garnet", | ||
"item.primeiro-mod.yan": "Yan" | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/primeiro-mod/models/item/pink_garnet.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": "primeiro-mod:item/pink_garnet" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/primeiro-mod/models/item/raw_pink_garnet.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": "primeiro-mod:item/raw_pink_garnet" | ||
} | ||
} |
Binary file added
BIN
+362 Bytes
src/main/resources/assets/primeiro-mod/textures/item/pink_garnet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+474 Bytes
src/main/resources/assets/primeiro-mod/textures/item/raw_pink_garnet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.