diff --git a/src/main/java/de/jottyfan/gta/gdp/item/ModArmorMaterials.java b/src/main/java/de/jottyfan/gta/gdp/item/ModArmorMaterials.java new file mode 100644 index 0000000..ddb552e --- /dev/null +++ b/src/main/java/de/jottyfan/gta/gdp/item/ModArmorMaterials.java @@ -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> REGISTRY_KEY = RegistryKey.ofRegistry(Identifier.ofVanilla("equipment_asset")); + public static final RegistryKey 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); +} diff --git a/src/main/java/de/jottyfan/gta/gdp/item/ModItems.java b/src/main/java/de/jottyfan/gta/gdp/item/ModItems.java index d6465f2..9d97ad1 100644 --- a/src/main/java/de/jottyfan/gta/gdp/item/ModItems.java +++ b/src/main/java/de/jottyfan/gta/gdp/item/ModItems.java @@ -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); }); } } diff --git a/src/main/resources/assets/gtagdp/equipment/ruby.json b/src/main/resources/assets/gtagdp/equipment/ruby.json new file mode 100644 index 0000000..81672a2 --- /dev/null +++ b/src/main/resources/assets/gtagdp/equipment/ruby.json @@ -0,0 +1,14 @@ +{ + "layers": { + "humanoid": [ + { + "texture": "gtagdp:ruby_top" + } + ], + "humanoid_leggings": [ + { + "texture": "gtagdp:ruby_bottom" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gtagdp/items/ruby_boots.json b/src/main/resources/assets/gtagdp/items/ruby_boots.json new file mode 100644 index 0000000..a8187f6 --- /dev/null +++ b/src/main/resources/assets/gtagdp/items/ruby_boots.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "gtagdp:item/ruby_boots" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gtagdp/items/ruby_chestplate.json b/src/main/resources/assets/gtagdp/items/ruby_chestplate.json new file mode 100644 index 0000000..801bf60 --- /dev/null +++ b/src/main/resources/assets/gtagdp/items/ruby_chestplate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "gtagdp:item/ruby_chestplate" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gtagdp/items/ruby_helmet.json b/src/main/resources/assets/gtagdp/items/ruby_helmet.json new file mode 100644 index 0000000..3e921e4 --- /dev/null +++ b/src/main/resources/assets/gtagdp/items/ruby_helmet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "gtagdp:item/ruby_helmet" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gtagdp/items/ruby_leggings.json b/src/main/resources/assets/gtagdp/items/ruby_leggings.json new file mode 100644 index 0000000..5e0fc13 --- /dev/null +++ b/src/main/resources/assets/gtagdp/items/ruby_leggings.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "gtagdp:item/ruby_leggings" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gtagdp/lang/de_de.json b/src/main/resources/assets/gtagdp/lang/de_de.json index 7ad5616..fd4706e 100644 --- a/src/main/resources/assets/gtagdp/lang/de_de.json +++ b/src/main/resources/assets/gtagdp/lang/de_de.json @@ -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", diff --git a/src/main/resources/assets/gtagdp/lang/en_us.json b/src/main/resources/assets/gtagdp/lang/en_us.json index 0b21abd..36556bd 100644 --- a/src/main/resources/assets/gtagdp/lang/en_us.json +++ b/src/main/resources/assets/gtagdp/lang/en_us.json @@ -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", diff --git a/src/main/resources/assets/gtagdp/models/item/ruby_boots.json b/src/main/resources/assets/gtagdp/models/item/ruby_boots.json new file mode 100644 index 0000000..abd4b74 --- /dev/null +++ b/src/main/resources/assets/gtagdp/models/item/ruby_boots.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "gtagdp:item/ruby_boots" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gtagdp/models/item/ruby_chestplate.json b/src/main/resources/assets/gtagdp/models/item/ruby_chestplate.json new file mode 100644 index 0000000..af24ea2 --- /dev/null +++ b/src/main/resources/assets/gtagdp/models/item/ruby_chestplate.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "gtagdp:item/ruby_chestplate" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gtagdp/models/item/ruby_helmet.json b/src/main/resources/assets/gtagdp/models/item/ruby_helmet.json new file mode 100644 index 0000000..5291490 --- /dev/null +++ b/src/main/resources/assets/gtagdp/models/item/ruby_helmet.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "gtagdp:item/ruby_helmet" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gtagdp/models/item/ruby_leggings.json b/src/main/resources/assets/gtagdp/models/item/ruby_leggings.json new file mode 100644 index 0000000..0ebfaef --- /dev/null +++ b/src/main/resources/assets/gtagdp/models/item/ruby_leggings.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "gtagdp:item/ruby_leggings" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/gtagdp/textures/entity/equipment/humanoid/ruby_top.png b/src/main/resources/assets/gtagdp/textures/entity/equipment/humanoid/ruby_top.png new file mode 100644 index 0000000..11699d1 Binary files /dev/null and b/src/main/resources/assets/gtagdp/textures/entity/equipment/humanoid/ruby_top.png differ diff --git a/src/main/resources/assets/gtagdp/textures/entity/equipment/humanoid_leggings/ruby_bottom.png b/src/main/resources/assets/gtagdp/textures/entity/equipment/humanoid_leggings/ruby_bottom.png new file mode 100644 index 0000000..ff4e16b Binary files /dev/null and b/src/main/resources/assets/gtagdp/textures/entity/equipment/humanoid_leggings/ruby_bottom.png differ diff --git a/src/main/resources/assets/gtagdp/textures/item/ruby_boots.png b/src/main/resources/assets/gtagdp/textures/item/ruby_boots.png new file mode 100644 index 0000000..22a6598 Binary files /dev/null and b/src/main/resources/assets/gtagdp/textures/item/ruby_boots.png differ diff --git a/src/main/resources/assets/gtagdp/textures/item/ruby_chestplate.png b/src/main/resources/assets/gtagdp/textures/item/ruby_chestplate.png new file mode 100644 index 0000000..4511e55 Binary files /dev/null and b/src/main/resources/assets/gtagdp/textures/item/ruby_chestplate.png differ diff --git a/src/main/resources/assets/gtagdp/textures/item/ruby_helmet.png b/src/main/resources/assets/gtagdp/textures/item/ruby_helmet.png new file mode 100644 index 0000000..b1272b3 Binary files /dev/null and b/src/main/resources/assets/gtagdp/textures/item/ruby_helmet.png differ diff --git a/src/main/resources/assets/gtagdp/textures/item/ruby_leggings.png b/src/main/resources/assets/gtagdp/textures/item/ruby_leggings.png new file mode 100644 index 0000000..6113107 Binary files /dev/null and b/src/main/resources/assets/gtagdp/textures/item/ruby_leggings.png differ diff --git a/src/main/resources/data/gtagdp/recipe/shaped_ruby_boots.json b/src/main/resources/data/gtagdp/recipe/shaped_ruby_boots.json new file mode 100644 index 0000000..8c00156 --- /dev/null +++ b/src/main/resources/data/gtagdp/recipe/shaped_ruby_boots.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "# #", + "# #" + ], + "key": { + "#": "gtagdp:rubyball" + }, + "result": { + "id": "gtagdp:ruby_boots", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/gtagdp/recipe/shaped_ruby_chestplate.json b/src/main/resources/data/gtagdp/recipe/shaped_ruby_chestplate.json new file mode 100644 index 0000000..d5fdf1d --- /dev/null +++ b/src/main/resources/data/gtagdp/recipe/shaped_ruby_chestplate.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "# #", + "###", + "###" + ], + "key": { + "#": "gtagdp:rubyball" + }, + "result": { + "id": "gtagdp:ruby_chestplate", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/gtagdp/recipe/shaped_ruby_helmet.json b/src/main/resources/data/gtagdp/recipe/shaped_ruby_helmet.json new file mode 100644 index 0000000..91bce2a --- /dev/null +++ b/src/main/resources/data/gtagdp/recipe/shaped_ruby_helmet.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "# #" + ], + "key": { + "#": "gtagdp:rubyball" + }, + "result": { + "id": "gtagdp:ruby_helmet", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/gtagdp/recipe/shaped_ruby_leggings.json b/src/main/resources/data/gtagdp/recipe/shaped_ruby_leggings.json new file mode 100644 index 0000000..aac4233 --- /dev/null +++ b/src/main/resources/data/gtagdp/recipe/shaped_ruby_leggings.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "# #", + "# #" + ], + "key": { + "#": "gtagdp:rubyball" + }, + "result": { + "id": "gtagdp:ruby_leggings", + "count": 1 + } +} \ No newline at end of file