mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 22:44:07 +01:00
Any Armor Repaired by a type of netherite is netherite now
fixes Creators-Of-Create#6422
This commit is contained in:
parent
d66170c8fe
commit
f5c82022ce
@ -8,6 +8,7 @@ import net.minecraft.world.entity.LivingEntity;
|
|||||||
import net.minecraft.world.item.ArmorItem;
|
import net.minecraft.world.item.ArmorItem;
|
||||||
import net.minecraft.world.item.ArmorMaterials;
|
import net.minecraft.world.item.ArmorMaterials;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraftforge.common.Tags;
|
||||||
import net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent;
|
import net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
@ -57,7 +58,7 @@ public final class NetheriteDivingHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNetheriteArmor(ItemStack 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) {
|
public static void setBit(LivingEntity entity, EquipmentSlot slot) {
|
||||||
|
Loading…
Reference in New Issue
Block a user