![Changed Addon Plus](https://media.forgecdn.net/avatars/thumbnails/949/783/256/256/638438127646487503.png)
Abdomen armor of painite
Foxyas opened this issue ยท 3 comments
Register code
Note Change the tab
public static final RegistryObject<AbdomenArmor> PAINITE_UPPER_ABDOMEN_ARMOR = register("paimite_upper_abdomen_armor",
() -> new AbdomenArmor(ArmorMaterials.NETHERITE, EquipmentSlot.LEGS, new Item.Properties().tab(ChangedTabs.TAB_CHANGED_COMBAT).fireResistant()));
public static final RegistryObject<AbdomenArmor> PAINITE_LOWER_ABDOMEN_ARMOR = register("painite_lower_abdomen_armor",
() -> new AbdomenArmor(ArmorMaterials.NETHERITE, EquipmentSlot.FEET, new Item.Properties().tab(ChangedTabs.TAB_CHANGED_COMBAT).fireResistant()));
Find the code for make armor
package net.foxyas.changedaddon.item;
import net.ltxprogrammer.changed.entity.variant.LatexVariant;
import net.ltxprogrammer.changed.init.ChangedTabs;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;
public class PainiteAbdomenArmor extends AbdomenArmor {
public static boolean useAbdomenModel(EquipmentSlot slot) {
return slot == EquipmentSlot.LEGS || slot == EquipmentSlot.FEET;
}
public static boolean useInnerAbdomenModel(EquipmentSlot slot) {
return slot == EquipmentSlot.FEET;
}
public PainiteAbdomenArmor(ArmorMaterial material, EquipmentSlot slot, Properties properties) {
super(material, slot, properties);
}
@Override
public void wearTick(LivingEntity entity, ItemStack itemStack) {} //tick of the armor
@Override
public boolean customWearRenderer() {
return false;
}
@Override
public boolean allowedToKeepWearing(LivingEntity entity) {
var variant = LatexVariant.getEntityVariant(entity);
return variant != null && !variant.hasLegs;
}
@Nullable
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, @Nullable String type) {
String texture = a;//texture local
String textureFeet = a;//texture local
return slot.feet ? textureFeet : texture;
}
}