Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Recently i decided to make some armor and after a long time i finally got it in the game but the model is not loading... can anybody help?

 

Here is my code for making the ruby armor material, i believe at the top where it says ":ruby" is telling minecraft where to pull the model from, not sure tho. 

public enum ModArmorMaterial implements IArmorMaterial {

    rubyMaterial(Zenox.Mod_ID + ":ruby", 5, new int[] { 7, 9, 11, 7 }, 420, SoundEvents.field_226124_Y_, 6.9F, () -> {
        return Ingredient.fromItems(RegistryHandler.testitem);  });


    private static final int[] MAX_DAMAGE_ARRAY = new int[] { 16, 16, 16, 16 };
    String name;
    int maxDamageFactor;
    int[] damageReductionAmountArray;
    int enchantability;
    SoundEvent soundEvent;
    float toughness;
    LazyValue<Ingredient> repairMaterial;

   private ModArmorMaterial(String nameIn, int maxDamageFactorIn, int[] damageReductionAmountIn,
                     int enchantabilityIn, SoundEvent soundEventIn, float toughnessIn,
                     Supplier<Ingredient> repairMaterialIn) {
        this.name = nameIn;
        this.maxDamageFactor = maxDamageFactorIn;
        this.damageReductionAmountArray = damageReductionAmountIn;
        this.enchantability = enchantabilityIn;
        this.soundEvent = soundEventIn;
        this.toughness = toughnessIn;
        this.repairMaterial = new LazyValue<>(repairMaterialIn);
    }

    @Override
    public int getDurability(EquipmentSlotType slotIn) {
        return MAX_DAMAGE_ARRAY[slotIn.getIndex()] * this.maxDamageFactor;
    }

    @Override
    public int getDamageReductionAmount(EquipmentSlotType slotIn) {
        return this.damageReductionAmountArray[slotIn.getIndex()];
    }

    @Override
    public int getEnchantability() {
        return this.enchantability;
    }

    @Override
    public SoundEvent getSoundEvent() {
        return this.soundEvent;
    }

    @Override
    public Ingredient getRepairMaterial() {
        return this.repairMaterial.getValue();
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public float getToughness() {
        return this.toughness;
    }
}

 

 

And here is me making all the specific armor pieces (not sure if its needed but might as well add it.


        event.getRegistry().register(new ArmorItem(ModArmorMaterial.rubyMaterial, EquipmentSlotType.HEAD,
                new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName("ruby_helmet"));

        event.getRegistry().register(new ArmorItem(ModArmorMaterial.rubyMaterial, EquipmentSlotType.CHEST,
                new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName("ruby_chest_plate"));

        event.getRegistry().register(new ArmorItem(ModArmorMaterial.rubyMaterial, EquipmentSlotType.LEGS,
                new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName("ruby_leggings"));

        event.getRegistry().register(new ArmorItem(ModArmorMaterial.rubyMaterial, EquipmentSlotType.FEET,
                new Item.Properties().group(ItemGroup.COMBAT)).setRegistryName("ruby_boots"));

 

 

and finally as you can see the files are tehre...

image.thumb.png.719710835d5911c023e57056ce882ff1.png

Is your models.armor package in textures models/armor on the filesystem, or actually named models.armor? I've seen that happen before where it ends up actually being named "models.armor", and that won't work

  • Author

i named it that myself when i made it, should i rename it to something else?

 

i fixed it, thanks for the help!!!

Edited by Adam1223

 

First define what version of minecraft you use, in 1.14.4 I already found the solution, click on my user to see the link, with that code I had lag problems if you have the same problem let me know

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.