From f5c82022cec51a002bc9cd3221add565b8acb485 Mon Sep 17 00:00:00 2001 From: attackeight Date: Mon, 6 May 2024 23:31:26 -0400 Subject: [PATCH] Any Armor Repaired by a type of netherite is netherite now fixes Creators-Of-Create#6422 --- .../content/equipment/armor/NetheriteDivingHandler.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/equipment/armor/NetheriteDivingHandler.java b/src/main/java/com/simibubi/create/content/equipment/armor/NetheriteDivingHandler.java index 41b09e7f6..1432d60c8 100644 --- a/src/main/java/com/simibubi/create/content/equipment/armor/NetheriteDivingHandler.java +++ b/src/main/java/com/simibubi/create/content/equipment/armor/NetheriteDivingHandler.java @@ -8,6 +8,7 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ArmorItem; import net.minecraft.world.item.ArmorMaterials; import net.minecraft.world.item.ItemStack; +import net.minecraftforge.common.Tags; import net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; @@ -51,13 +52,13 @@ public final class NetheriteDivingHandler { public static boolean isNetheriteDivingHelmet(ItemStack stack) { return stack.getItem() instanceof DivingHelmetItem && isNetheriteArmor(stack); } - + public static boolean isNetheriteBacktank(ItemStack stack) { return stack.is(AllItemTags.PRESSURIZED_AIR_SOURCES.tag) && isNetheriteArmor(stack); } - + public static boolean isNetheriteArmor(ItemStack stack) { - return stack.getItem() instanceof ArmorItem armorItem && armorItem.getMaterial() == ArmorMaterials.NETHERITE; + return stack.getItem() instanceof ArmorItem armorItem && armorItem.getMaterial().getRepairIngredient().getItems()[0].is(Tags.Items.INGOTS_NETHERITE); } public static void setBit(LivingEntity entity, EquipmentSlot slot) {