diff --git a/src/main/java/de/jottyfan/minecraft/item/ModArmorMaterials.java b/src/main/java/de/jottyfan/minecraft/item/ModArmorMaterials.java new file mode 100644 index 0000000..4bd4618 --- /dev/null +++ b/src/main/java/de/jottyfan/minecraft/item/ModArmorMaterials.java @@ -0,0 +1,31 @@ +package de.jottyfan.minecraft.item; + +import java.util.EnumMap; + +import de.jottyfan.minecraft.Quickly; +import net.minecraft.core.Registry; +import net.minecraft.resources.Identifier; +import net.minecraft.resources.ResourceKey; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.util.Util; +import net.minecraft.world.item.equipment.ArmorMaterial; +import net.minecraft.world.item.equipment.ArmorType; +import net.minecraft.world.item.equipment.EquipmentAsset; + +/** + * + * @author jotty + * + */ +public class ModArmorMaterials { + static ResourceKey> REGISTRY_KEY = ResourceKey.createRegistryKey(Identifier.fromNamespaceAndPath("minecraft", "equipment_asset")); + public static final ResourceKey TURQUOISE_KEY = ResourceKey.create(REGISTRY_KEY, Identifier.fromNamespaceAndPath(Quickly.MOD_ID, "turquoise")); + + public static final ArmorMaterial TURQUOISE_ARMOR_MATERIAL = new ArmorMaterial(500, Util.make(new EnumMap<>(ArmorType.class), map -> { + map.put(ArmorType.BOOTS, 4); + map.put(ArmorType.LEGGINGS, 8); + map.put(ArmorType.CHESTPLATE, 15); + map.put(ArmorType.HELMET, 4); + map.put(ArmorType.BODY, 8); + }), 20, SoundEvents.ARMOR_EQUIP_DIAMOND, 0, 0, null, TURQUOISE_KEY); +} diff --git a/src/main/java/de/jottyfan/minecraft/item/QuicklyItems.java b/src/main/java/de/jottyfan/minecraft/item/QuicklyItems.java index 8b97b71..d995d43 100644 --- a/src/main/java/de/jottyfan/minecraft/item/QuicklyItems.java +++ b/src/main/java/de/jottyfan/minecraft/item/QuicklyItems.java @@ -12,6 +12,7 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.world.item.CreativeModeTabs; import net.minecraft.world.item.Item; import net.minecraft.world.item.Item.Properties; +import net.minecraft.world.item.equipment.ArmorType; /** * @@ -27,6 +28,16 @@ public class QuicklyItems { public static final Item COTTONSEED = registerItem("cottonseed", properties -> new Plant(properties, "blockcottonplant")); public static final Item ROTTENFLESHSTRIPES = registerItem("rotten_flesh_stripes"); + public static final Item ARMOR_TURQUOISE_BOOTS = registerItem("turquoise_boots", ArmorType.BOOTS); + public static final Item ARMOR_TURQUOISE_HELMET = registerItem("turquoise_helmet", ArmorType.HELMET); + public static final Item ARMOR_TURQUOISE_LEGGINGS = registerItem("turquoise_leggings", ArmorType.LEGGINGS); + public static final Item ARMOR_TURQUOISE_CHESTPLATE = registerItem("turquoise_chestplate", ArmorType.CHESTPLATE); + + + private static final Item registerItem(String name, ArmorType armorType) { + return QuicklyItems.registerItem(name, new Item.Properties().stacksTo(1).humanoidArmor(ModArmorMaterials.TURQUOISE_ARMOR_MATERIAL, armorType)); + } + private static final Item registerItem(String name) { return QuicklyItems.registerItem(name, new Item.Properties()); } @@ -54,6 +65,11 @@ public class QuicklyItems { item.accept(COTTON); item.accept(COTTONSEED); item.accept(ROTTENFLESHSTRIPES); + + item.accept(ARMOR_TURQUOISE_HELMET); + item.accept(ARMOR_TURQUOISE_CHESTPLATE); + item.accept(ARMOR_TURQUOISE_LEGGINGS); + item.accept(ARMOR_TURQUOISE_BOOTS); }); } } diff --git a/src/main/resources/assets/quickly/equipment/turquoise.json b/src/main/resources/assets/quickly/equipment/turquoise.json new file mode 100644 index 0000000..0956f97 --- /dev/null +++ b/src/main/resources/assets/quickly/equipment/turquoise.json @@ -0,0 +1,14 @@ +{ + "layers": { + "humanoid": [ + { + "texture": "quickly:turquoise" + } + ], + "humanoid_leggings": [ + { + "texture": "quickly:turquoise" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/items/turquoise_boots.json b/src/main/resources/assets/quickly/items/turquoise_boots.json new file mode 100644 index 0000000..3493947 --- /dev/null +++ b/src/main/resources/assets/quickly/items/turquoise_boots.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:item/turquoise_boots" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/items/turquoise_chestplate.json b/src/main/resources/assets/quickly/items/turquoise_chestplate.json new file mode 100644 index 0000000..6c36693 --- /dev/null +++ b/src/main/resources/assets/quickly/items/turquoise_chestplate.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:item/turquoise_chestplate" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/items/turquoise_helmet.json b/src/main/resources/assets/quickly/items/turquoise_helmet.json new file mode 100644 index 0000000..b8e8435 --- /dev/null +++ b/src/main/resources/assets/quickly/items/turquoise_helmet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:item/turquoise_helmet" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/items/turquoise_leggings.json b/src/main/resources/assets/quickly/items/turquoise_leggings.json new file mode 100644 index 0000000..6af34e4 --- /dev/null +++ b/src/main/resources/assets/quickly/items/turquoise_leggings.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "quickly:item/turquoise_leggings" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/quickly/lang/de_de.json b/src/main/resources/assets/quickly/lang/de_de.json index b9f66ba..5fd9f62 100644 --- a/src/main/resources/assets/quickly/lang/de_de.json +++ b/src/main/resources/assets/quickly/lang/de_de.json @@ -9,5 +9,9 @@ "item.quickly.rawturquoise": "rohes Türkis", "item.quickly.rotten_flesh_stripes": "geschnittenes Gammelfleisch", "item.quickly.stub": "Stummel", + "item.quickly.turquoise_boots": "Türkisschuhe", + "item.quickly.turquoise_chestplate": "Türkisbrustpanzer", + "item.quickly.turquoise_helmet": "Türkishelm", + "item.quickly.turquoise_leggings": "Türkishose", "item.quickly.turquoiseingot": "Türkisbarren" } diff --git a/src/main/resources/assets/quickly/lang/en_us.json b/src/main/resources/assets/quickly/lang/en_us.json index 5d2d913..970de52 100644 --- a/src/main/resources/assets/quickly/lang/en_us.json +++ b/src/main/resources/assets/quickly/lang/en_us.json @@ -9,5 +9,9 @@ "item.quickly.rawturquoise": "raw turquoise", "item.quickly.rotten_flesh_stripes": "rotton flesh stripes", "item.quickly.stub": "stub", + "item.quickly.turquoise_boots": "turquoise boots", + "item.quickly.turquoise_chestplate": "turquoise chestplate", + "item.quickly.turquoise_helmet": "turquoise helmet", + "item.quickly.turquoise_leggings": "turquoise leggings", "item.quickly.turquoiseingot": "turquoise ingot" } diff --git a/src/main/resources/assets/quickly/models/item/turquoise_boots.json b/src/main/resources/assets/quickly/models/item/turquoise_boots.json new file mode 100644 index 0000000..ed99d3e --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/turquoise_boots.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "quickly:item/turquoise_boots" + } +} diff --git a/src/main/resources/assets/quickly/models/item/turquoise_chestplate.json b/src/main/resources/assets/quickly/models/item/turquoise_chestplate.json new file mode 100644 index 0000000..5f80392 --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/turquoise_chestplate.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "quickly:item/turquoise_chestplate" + } +} diff --git a/src/main/resources/assets/quickly/models/item/turquoise_helmet.json b/src/main/resources/assets/quickly/models/item/turquoise_helmet.json new file mode 100644 index 0000000..610ceba --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/turquoise_helmet.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "quickly:item/turquoise_helmet" + } +} diff --git a/src/main/resources/assets/quickly/models/item/turquoise_leggings.json b/src/main/resources/assets/quickly/models/item/turquoise_leggings.json new file mode 100644 index 0000000..0800cc1 --- /dev/null +++ b/src/main/resources/assets/quickly/models/item/turquoise_leggings.json @@ -0,0 +1,6 @@ +{ + "parent": "item/coal", + "textures": { + "layer0": "quickly:item/turquoise_leggings" + } +} diff --git a/src/main/resources/assets/quickly/textures/entity/equipment/humanoid/turquoise.png b/src/main/resources/assets/quickly/textures/entity/equipment/humanoid/turquoise.png new file mode 100644 index 0000000..0b5dede Binary files /dev/null and b/src/main/resources/assets/quickly/textures/entity/equipment/humanoid/turquoise.png differ diff --git a/src/main/resources/assets/quickly/textures/entity/equipment/humanoid_leggings/turquoise.png b/src/main/resources/assets/quickly/textures/entity/equipment/humanoid_leggings/turquoise.png new file mode 100644 index 0000000..6b6e5dc Binary files /dev/null and b/src/main/resources/assets/quickly/textures/entity/equipment/humanoid_leggings/turquoise.png differ diff --git a/src/main/resources/assets/quickly/textures/item/turquoise_boots.png b/src/main/resources/assets/quickly/textures/item/turquoise_boots.png new file mode 100644 index 0000000..1940f6f Binary files /dev/null and b/src/main/resources/assets/quickly/textures/item/turquoise_boots.png differ diff --git a/src/main/resources/assets/quickly/textures/item/turquoise_chestplate.png b/src/main/resources/assets/quickly/textures/item/turquoise_chestplate.png new file mode 100644 index 0000000..f704ead Binary files /dev/null and b/src/main/resources/assets/quickly/textures/item/turquoise_chestplate.png differ diff --git a/src/main/resources/assets/quickly/textures/item/turquoise_helmet.png b/src/main/resources/assets/quickly/textures/item/turquoise_helmet.png new file mode 100644 index 0000000..315c12e Binary files /dev/null and b/src/main/resources/assets/quickly/textures/item/turquoise_helmet.png differ diff --git a/src/main/resources/assets/quickly/textures/item/turquoise_leggings.png b/src/main/resources/assets/quickly/textures/item/turquoise_leggings.png new file mode 100644 index 0000000..0b1a064 Binary files /dev/null and b/src/main/resources/assets/quickly/textures/item/turquoise_leggings.png differ diff --git a/src/main/resources/data/quickly/recipe/shaped_turquoise_boots.json b/src/main/resources/data/quickly/recipe/shaped_turquoise_boots.json new file mode 100644 index 0000000..7253375 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shaped_turquoise_boots.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "t t", + "t t" + ], + "key": { + "t": "quickly:turquoiseingot" + }, + "result": { + "id": "quickly:turquoise_boots", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/shaped_turquoise_chestplate.json b/src/main/resources/data/quickly/recipe/shaped_turquoise_chestplate.json new file mode 100644 index 0000000..14ca653 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shaped_turquoise_chestplate.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "t t", + "ttt", + "ttt" + ], + "key": { + "t": "quickly:turquoiseingot" + }, + "result": { + "id": "quickly:turquoise_chestplate", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/shaped_turquoise_helmet.json b/src/main/resources/data/quickly/recipe/shaped_turquoise_helmet.json new file mode 100644 index 0000000..cc42ad2 --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shaped_turquoise_helmet.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ttt", + "t t" + ], + "key": { + "t": "quickly:turquoiseingot" + }, + "result": { + "id": "quickly:turquoise_helmet", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/quickly/recipe/shaped_turquoise_leggings.json b/src/main/resources/data/quickly/recipe/shaped_turquoise_leggings.json new file mode 100644 index 0000000..6c8796b --- /dev/null +++ b/src/main/resources/data/quickly/recipe/shaped_turquoise_leggings.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ttt", + "t t", + "t t" + ], + "key": { + "t": "quickly:turquoiseingot" + }, + "result": { + "id": "quickly:turquoise_leggings", + "count": 1 + } +} \ No newline at end of file