#Start first mod
23 messages · Page 1 of 1 (latest)
Learn about DataComponentTypes they're essentially the new structure of items
Will I find it in the fabric wiki?
https://fabricmc.net/wiki/tutorial:armor yeah, I think
ohh lets goo
thanks man
and how does everything work with the crafting interface?
for example I want to make a pig armor and I would need normal armor for it plus some carrots
I think this is what you're looking for https://fabricmc.net/wiki/tutorial:recipe_type but if you prefer videos, checkout Kaupenjoe's video on recipes
sure
👍
hey so I started making the mod
and I got some problems
package;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import net.fabricmc.api.ModInitializer;
import net.minecraft.data.client.BlockStateModelGenerator;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
public class CustomArmorMaterial implements ArmorMaterial {
private static final int[] BASE_DURABILITY = new int[] {13, 15, 16, 11};
private static final int[] PROTECTION_VALUES = new int[] {A, B, C, D};
// A is boots, B leggins, c chestplate, and D helmet
// For reference, Leather uses {1, 2, 3, 1}, and Diamond/Netherite {3, 6, 8, 3}
@Override
public int method_7696(EquipmentSlot slot) {
return BASE_DURABILITY[slot.getEntitySlotId()];
}
@Override
public int method_7697(EquipmentSlot slot) {
return BASE_DURABILITY[slot.getEntitySlotId()];
}
@Override
public int getEnchantability() {
return X;
}
@Override
public SoundEvent getEquipSound {
return SoundEvents.ITEM_ARMOR_EQUIP_X;
}
@Override
public Ingredient getRepairIngredient() {
return Ingredient.ofItems(RegisterItems.X);
}
@Override
public String getName() {
// Must be all lowercase
return "name";
}
@Override
public float getToughness() {
return X.0F;
}
@teluri
public float getKnockbackResistance() {
return X.0F;
}
}
ok whats the problem?
so basically the parameters are red and things like the class name
You're supposed to replace all the X values and whatnot with actual values
So for example X.0F you would change to 3.0F or something
i can also recommend the Tutorial Series by Kaupenjoe on YouTube, there you can learn the most basic stuff and later on some more advanced.
Thanks I will watch those today