diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/armor/SimpleTritaniumArmorItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/armor/SimpleTritaniumArmorItem.kt index 55988f2e4..1a80ef610 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/armor/SimpleTritaniumArmorItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/armor/SimpleTritaniumArmorItem.kt @@ -2,9 +2,11 @@ package ru.dbotthepony.mc.otm.item.armor import net.minecraft.sounds.SoundEvent import net.minecraft.sounds.SoundEvents +import net.minecraft.world.entity.Entity import net.minecraft.world.entity.EquipmentSlot import net.minecraft.world.item.ArmorItem import net.minecraft.world.item.ArmorMaterial +import net.minecraft.world.item.ItemStack import net.minecraft.world.item.crafting.Ingredient import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.registry.MItemTags @@ -42,4 +44,14 @@ private object SimpleTritaniumArmorMaterial : ArmorMaterial { } class SimpleTritaniumArmorItem(slot: EquipmentSlot) : ArmorItem(SimpleTritaniumArmorMaterial, slot, Properties().stacksTo(1)) { + override fun getArmorTexture(stack: ItemStack, entity: Entity?, slot: EquipmentSlot, type: String?): String? { + if (type != "overlay" || slot == EquipmentSlot.FEET) + return when (slot) { + EquipmentSlot.LEGS -> "${OverdriveThatMatters.MOD_ID}:textures/models/armor/tritanium_simple_layer_2.png" + EquipmentSlot.FEET, EquipmentSlot.CHEST, EquipmentSlot.HEAD -> "${OverdriveThatMatters.MOD_ID}:textures/models/armor/tritanium_simple_layer_1.png" + else -> throw IllegalArgumentException("Invalid slot $slot") + } + + return null + } }