Не отображается модель брони

Версия Minecraft
1.12.2
148
2
6
Я всё перепробовал но ни в какую, ни в слотах инвентаря, ни в персонаже.
 
148
2
6
Код:
public static final ArmorMaterial armorMaterial = EnumHelper.addArmorMaterial("vanillarealisticrecipes:armor_layer", "vanillarealisticrecipes:armor", 44, new int[]{5, 9, 11, 4}, 20, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 2.0F);
    
    // Item Obsidian Armor
    public static Item OBSIDIANHELMET = new ObsidianArmor("obsidian_helmet", armorMaterial, 1, EntityEquipmentSlot.HEAD);
    public static Item OBSIDIANCHESTPLATE = new ObsidianArmor("obsidian_chestplate", armorMaterial, 1, EntityEquipmentSlot.CHEST);
    public static Item OBSIDIANLEGGINGS = new ObsidianArmor("obsidian_leggings", armorMaterial, 2, EntityEquipmentSlot.LEGS);
    public static Item OBSIDIANBOOTS = new ObsidianArmor("obsidian_boots", armorMaterial, 1, EntityEquipmentSlot.FEET);
 
148
2
6
Код:
public class ObsidianArmor extends ItemArmor{
    public ObsidianArmor(String name, ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn){
        
        super(materialIn, renderIndexIn, equipmentSlotIn);
        this.setRegistryName(name);
        this.setUnlocalizedName(name);
        this.setCreativeTab(VanillaRealisticRecipes.Vanilla_Realistic_Recipes);
}
        
        public void registerModels(){
            VanillaRealisticRecipes.proxy.registerItemRenderer(this, 0, "inventory");
}}
 
148
2
6
Добавлены картинки по пути:
C:\Users\Пользователь\Desktop\VanillaRealisticRecipes\src\main\resources\assets\vanillarealisticrecipes\textures\models\armor, C:\Users\Пользователь\Desktop\VanillaRealisticRecipes\src\main\resources\assets\vanillarealisticrecipes\textures\items
 

timaxa007

Модератор
5,831
409
672
Что-то не вижу у тебя в классе ObsidianArmor метода getArmorTexture:
Java:
    /**
     * Called by RenderBiped and RenderPlayer to determine the armor texture that
     * should be use for the currently equipped item.
     * This will only be called on instances of ItemArmor.
     *
     * Returning null from this function will use the default value.
     *
     * @param stack ItemStack for the equipped armor
     * @param entity The entity wearing the armor
     * @param slot The slot the armor is in
     * @param type The subtype, can be null or "overlay"
     * @return Path of texture to bind, or null to use default
     */
    @Nullable
    public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type)
    {
        return null;
    }
 
148
2
6
Похоже я уже решил проблему.

В json файле в конце я забыл поставить знак ", 5 раз там побывал, и не заметил, у меня не досып был, возможно из-за него я не замечал незначительные детали )
И на счёт ObsidianArmor метода getArmorTexture: Что американский разраб в видео такого не писал, что в учебнике не было таких значений. Пытаясь добавить лишние детали, Ivasic их не одобряет и не merged исправление на Github'e. Зато другой пользователь принимает исправления. Но на сайте их не слыхом слыхано.
 
Последнее редактирование:
5,018
47
783
Сверху