added armor

This commit is contained in:
Jottyfan
2025-12-25 18:26:31 +01:00
parent 83ddc724bd
commit a4dd705db3
23 changed files with 175 additions and 0 deletions

View File

@@ -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<? extends Registry<EquipmentAsset>> REGISTRY_KEY = ResourceKey.createRegistryKey(Identifier.fromNamespaceAndPath("minecraft", "equipment_asset"));
public static final ResourceKey<EquipmentAsset> 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);
}

View File

@@ -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);
});
}
}

View File

@@ -0,0 +1,14 @@
{
"layers": {
"humanoid": [
{
"texture": "quickly:turquoise"
}
],
"humanoid_leggings": [
{
"texture": "quickly:turquoise"
}
]
}
}

View File

@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "quickly:item/turquoise_boots"
}
}

View File

@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "quickly:item/turquoise_chestplate"
}
}

View File

@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "quickly:item/turquoise_helmet"
}
}

View File

@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "quickly:item/turquoise_leggings"
}
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/coal",
"textures": {
"layer0": "quickly:item/turquoise_boots"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/coal",
"textures": {
"layer0": "quickly:item/turquoise_chestplate"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/coal",
"textures": {
"layer0": "quickly:item/turquoise_helmet"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/coal",
"textures": {
"layer0": "quickly:item/turquoise_leggings"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -0,0 +1,14 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"t t",
"t t"
],
"key": {
"t": "quickly:turquoiseingot"
},
"result": {
"id": "quickly:turquoise_boots",
"count": 1
}
}

View File

@@ -0,0 +1,15 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"t t",
"ttt",
"ttt"
],
"key": {
"t": "quickly:turquoiseingot"
},
"result": {
"id": "quickly:turquoise_chestplate",
"count": 1
}
}

View File

@@ -0,0 +1,14 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"ttt",
"t t"
],
"key": {
"t": "quickly:turquoiseingot"
},
"result": {
"id": "quickly:turquoise_helmet",
"count": 1
}
}

View File

@@ -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
}
}