Posted September 10, 20205 yr I'm trying to make an armor set... i saw other modders go through this perfectly w/o errors, but i do. public enum ModArmorMaterial implements IArmorMaterial { ; // ruby_layer_1 ruby_layer_2 // this constructor \/ is the error WOOD(Main.MOD_ID + ":wood", 5, new int[] { 1, 1, 1, 1 }, 6, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 0.3f, () -> { return Ingredient.fromItems(Items.OAK_WOOD, Items.ACACIA_WOOD, Items.SPRUCE_WOOD, Items.BIRCH_WOOD, Items.DARK_OAK_WOOD); }); private static final int[] MAX_DAMAGE_ARRAY = new int[] { 13, 16, 15, 11 }; private final String name; private final int maxDamageFactor; private final int[] damageReductionAmountArray; private final int enchantability; private final SoundEvent soundEvent; private final float toughness; private final Supplier<Ingredient> repairMaterial; ModArmorMaterial(String name, int maxDamageFactor, int[] damageReductionAmountArray, int enchantability, SoundEvent soundEvent, float toughness, Supplier<Ingredient> repairMaterial) { this.name = name; this.maxDamageFactor = maxDamageFactor; this.damageReductionAmountArray = damageReductionAmountArray; this.enchantability = enchantability; this.soundEvent = soundEvent; this.toughness = toughness; this.repairMaterial = repairMaterial; } @Override public int getDurability(EquipmentSlotType slotIn) { // TODO Auto-generated method stub return MAX_DAMAGE_ARRAY[slotIn.getIndex()] + this.maxDamageFactor; } @Override public int getDamageReductionAmount(EquipmentSlotType slotIn) { // TODO Auto-generated method stub return this.damageReductionAmountArray[slotIn.getIndex()]; } @Override public int getEnchantability() { // TODO Auto-generated method stub return this.enchantability; } @Override public SoundEvent getSoundEvent() { // TODO Auto-generated method stub return this.soundEvent; } @Override public Ingredient getRepairMaterial() { // TODO Auto-generated method stub return this.repairMaterial.get(); } @OnlyIn(Dist.CLIENT) @Override public String getName() { // TODO Auto-generated method stub return this.name; } @Override public float getToughness() { // TODO Auto-generated method stub return this.toughness; } @Override public float func_230304_f_() { // TODO Auto-generated method stub return 0; } } I don't know what to do. Am i forgetting something? Suggestion fixes suggest me to either add void modifier or change to constructor. Edited September 10, 20205 yr by SonPlaying
September 10, 20205 yr Quote public enum ModArmorMaterial implements IArmorMaterial { ; // ruby_layer_1 ruby_layer_2 // this constructor \/ is the error WOOD(Main.MOD_ID + ":wood", 5, new int[] { 1, 1, 1, 1 }, 6, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 0.3f, () -> { return Ingredient.fromItems(Items.OAK_WOOD, Items.ACACIA_WOOD, Items.SPRUCE_WOOD, Items.BIRCH_WOOD, Items.DARK_OAK_WOOD); }); You see there is a " ; " right after: public enum ModArmorMaterial implements IArmorMaterial { that is a sintax error and needs to be removed. Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 10, 20205 yr Author 59 minutes ago, Beethoven92 said: You see there is a " ; " right after: public enum ModArmorMaterial implements IArmorMaterial { that is a sintax error and needs to be removed. That automatically adds when i implement IArmorMaterial, but ok.
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.