added ruby armor
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package de.jottyfan.gta.gdp.item;
|
||||
|
||||
import java.util.EnumMap;
|
||||
|
||||
import de.jottyfan.gta.gdp.GTAGDP;
|
||||
import net.minecraft.item.equipment.ArmorMaterial;
|
||||
import net.minecraft.item.equipment.EquipmentAsset;
|
||||
import net.minecraft.item.equipment.EquipmentType;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.Util;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jotty
|
||||
*
|
||||
*/
|
||||
public class ModArmorMaterials {
|
||||
static RegistryKey<? extends Registry<EquipmentAsset>> REGISTRY_KEY = RegistryKey.ofRegistry(Identifier.ofVanilla("equipment_asset"));
|
||||
public static final RegistryKey<EquipmentAsset> RUBY_KEY = RegistryKey.of(REGISTRY_KEY, Identifier.of(GTAGDP.MOD_ID, "ruby"));
|
||||
public static final ArmorMaterial RUBY_ARMOR_MATERIAL = new ArmorMaterial(500, Util.make(new EnumMap<>(EquipmentType.class), map -> {
|
||||
map.put(EquipmentType.BOOTS, 2);
|
||||
map.put(EquipmentType.LEGGINGS, 3);
|
||||
map.put(EquipmentType.CHESTPLATE, 4);
|
||||
map.put(EquipmentType.HELMET, 1);
|
||||
map.put(EquipmentType.BODY, 4);
|
||||
}), 20, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 0, 0, null, RUBY_KEY);
|
||||
}
|
@@ -5,6 +5,7 @@ import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Item.Settings;
|
||||
import net.minecraft.item.ItemGroups;
|
||||
import net.minecraft.item.equipment.EquipmentType;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
@@ -18,11 +19,12 @@ import net.minecraft.util.Identifier;
|
||||
*/
|
||||
public class ModItems {
|
||||
|
||||
public static final Item STUB = registerStubItem(
|
||||
Identifier.of(GTAGDP.MOD_ID, "stub"),
|
||||
new Item.Settings().food(ModFoodComponents.DELICIOUS_STUB));
|
||||
|
||||
public static final Item STUB = registerStubItem(Identifier.of(GTAGDP.MOD_ID, "stub"), new Item.Settings().food(ModFoodComponents.DELICIOUS_STUB));
|
||||
public static final Item RUBYBALL = registerItem(Identifier.of(GTAGDP.MOD_ID, "rubyball"), new Item.Settings());
|
||||
public static final Item ARMOR_RUBY_HELMET = registerItem(Identifier.of(GTAGDP.MOD_ID, "ruby_helmet"), new Item.Settings().maxCount(1).armor(ModArmorMaterials.RUBY_ARMOR_MATERIAL, EquipmentType.HELMET));
|
||||
public static final Item ARMOR_RUBY_CHESTPLATE = registerItem(Identifier.of(GTAGDP.MOD_ID, "ruby_chestplate"), new Item.Settings().maxCount(1).armor(ModArmorMaterials.RUBY_ARMOR_MATERIAL, EquipmentType.CHESTPLATE));
|
||||
public static final Item ARMOR_RUBY_LEGGINGS = registerItem(Identifier.of(GTAGDP.MOD_ID, "ruby_leggings"), new Item.Settings().maxCount(1).armor(ModArmorMaterials.RUBY_ARMOR_MATERIAL, EquipmentType.LEGGINGS));
|
||||
public static final Item ARMOR_RUBY_BOOTS = registerItem(Identifier.of(GTAGDP.MOD_ID, "ruby_boots"), new Item.Settings().maxCount(1).armor(ModArmorMaterials.RUBY_ARMOR_MATERIAL, EquipmentType.BOOTS));
|
||||
|
||||
private static Item registerItem(Identifier identifier, Settings settings) {
|
||||
return Registry.register(Registries.ITEM, identifier,
|
||||
@@ -40,6 +42,10 @@ public class ModItems {
|
||||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.TOOLS).register(entries -> {
|
||||
entries.add(STUB);
|
||||
entries.add(RUBYBALL);
|
||||
entries.add(ARMOR_RUBY_HELMET);
|
||||
entries.add(ARMOR_RUBY_CHESTPLATE);
|
||||
entries.add(ARMOR_RUBY_LEGGINGS);
|
||||
entries.add(ARMOR_RUBY_BOOTS);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
14
src/main/resources/assets/gtagdp/equipment/ruby.json
Normal file
14
src/main/resources/assets/gtagdp/equipment/ruby.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"layers": {
|
||||
"humanoid": [
|
||||
{
|
||||
"texture": "gtagdp:ruby_top"
|
||||
}
|
||||
],
|
||||
"humanoid_leggings": [
|
||||
{
|
||||
"texture": "gtagdp:ruby_bottom"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
6
src/main/resources/assets/gtagdp/items/ruby_boots.json
Normal file
6
src/main/resources/assets/gtagdp/items/ruby_boots.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "gtagdp:item/ruby_boots"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "gtagdp:item/ruby_chestplate"
|
||||
}
|
||||
}
|
6
src/main/resources/assets/gtagdp/items/ruby_helmet.json
Normal file
6
src/main/resources/assets/gtagdp/items/ruby_helmet.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "gtagdp:item/ruby_helmet"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "gtagdp:item/ruby_leggings"
|
||||
}
|
||||
}
|
@@ -1,6 +1,10 @@
|
||||
{
|
||||
"item.gtagdp.stub": "Stummel",
|
||||
"item.gtagdp.rubyball": "Rubinball",
|
||||
"item.gtagdp.ruby_helmet": "Rubinhelm",
|
||||
"item.gtagdp.ruby_chestplate": "Rubinbrustpanzer",
|
||||
"item.gtagdp.ruby_leggings": "Rubinhose",
|
||||
"item.gtagdp.ruby_boots": "Rubinstiefel",
|
||||
|
||||
"block.gtagdp.ruby_block": "Rubinblock",
|
||||
"block.gtagdp.ruby_ore": "Rubinerz",
|
||||
|
@@ -1,6 +1,10 @@
|
||||
{
|
||||
"item.gtagdp.stub": "Stub",
|
||||
"item.gtagdp.rubyball": "Ruby ball",
|
||||
"item.gtagdp.ruby_helmet": "Ruby helmet",
|
||||
"item.gtagdp.ruby_chestplate": "Ruby chestplate",
|
||||
"item.gtagdp.ruby_leggings": "Ruby leggings",
|
||||
"item.gtagdp.ruby_boots": "Ruby boots",
|
||||
|
||||
"block.gtagdp.ruby_block": "Ruby block",
|
||||
"block.gtagdp.ruby_ore": "Ruby ore",
|
||||
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "gtagdp:item/ruby_boots"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "gtagdp:item/ruby_chestplate"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "gtagdp:item/ruby_helmet"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/coal",
|
||||
"textures": {
|
||||
"layer0": "gtagdp:item/ruby_leggings"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
BIN
src/main/resources/assets/gtagdp/textures/item/ruby_boots.png
Normal file
BIN
src/main/resources/assets/gtagdp/textures/item/ruby_boots.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
BIN
src/main/resources/assets/gtagdp/textures/item/ruby_helmet.png
Normal file
BIN
src/main/resources/assets/gtagdp/textures/item/ruby_helmet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
src/main/resources/assets/gtagdp/textures/item/ruby_leggings.png
Normal file
BIN
src/main/resources/assets/gtagdp/textures/item/ruby_leggings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
14
src/main/resources/data/gtagdp/recipe/shaped_ruby_boots.json
Normal file
14
src/main/resources/data/gtagdp/recipe/shaped_ruby_boots.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"# #",
|
||||
"# #"
|
||||
],
|
||||
"key": {
|
||||
"#": "gtagdp:rubyball"
|
||||
},
|
||||
"result": {
|
||||
"id": "gtagdp:ruby_boots",
|
||||
"count": 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"# #",
|
||||
"###",
|
||||
"###"
|
||||
],
|
||||
"key": {
|
||||
"#": "gtagdp:rubyball"
|
||||
},
|
||||
"result": {
|
||||
"id": "gtagdp:ruby_chestplate",
|
||||
"count": 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"###",
|
||||
"# #"
|
||||
],
|
||||
"key": {
|
||||
"#": "gtagdp:rubyball"
|
||||
},
|
||||
"result": {
|
||||
"id": "gtagdp:ruby_helmet",
|
||||
"count": 1
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"###",
|
||||
"# #",
|
||||
"# #"
|
||||
],
|
||||
"key": {
|
||||
"#": "gtagdp:rubyball"
|
||||
},
|
||||
"result": {
|
||||
"id": "gtagdp:ruby_leggings",
|
||||
"count": 1
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user