Fix armor textures and implement new armor material system
- Created ShardDiamondArmorMaterial class with proper getName() returning "custom_ore_gen:shard_diamond" - Updated all armor items to use the new material instance - Added new armor textures from new_armor folder - Fixed armor texture loading by using correct modid:name format in getName() - Added CLAUDE.md for project documentation - Added armor crafting recipes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
@@ -0,0 +1,56 @@
|
||||
package net.mcreator.customoregen.item;
|
||||
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.world.item.ArmorItem;
|
||||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.mcreator.customoregen.init.CustomOreGenModItems;
|
||||
import net.mcreator.customoregen.CustomOreGenMod;
|
||||
|
||||
public class ShardDiamondArmorMaterial implements ArmorMaterial {
|
||||
public static final ShardDiamondArmorMaterial INSTANCE = new ShardDiamondArmorMaterial();
|
||||
|
||||
private static final int[] DURABILITY_PER_SLOT = new int[]{250, 300, 280, 230};
|
||||
private static final int[] PROTECTION_PER_SLOT = new int[]{3, 7, 5, 2};
|
||||
|
||||
@Override
|
||||
public int getDurabilityForType(ArmorItem.Type type) {
|
||||
return DURABILITY_PER_SLOT[type.getSlot().getIndex()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefenseForType(ArmorItem.Type type) {
|
||||
return PROTECTION_PER_SLOT[type.getSlot().getIndex()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnchantmentValue() {
|
||||
return 14;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEvent getEquipSound() {
|
||||
return SoundEvents.ARMOR_EQUIP_DIAMOND;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ingredient getRepairIngredient() {
|
||||
return Ingredient.of(CustomOreGenModItems.DIAMONDSHARD.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return CustomOreGenMod.MODID + ":shard_diamond";
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getToughness() {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getKnockbackResistance() {
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,10 @@
|
||||
package net.mcreator.customoregen.item;
|
||||
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.ArmorItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModItems;
|
||||
|
||||
public class SharddiamondbootsItem extends ArmorItem {
|
||||
public SharddiamondbootsItem() {
|
||||
super(new ArmorMaterial() {
|
||||
public int getDurabilityForType(ArmorItem.Type type) {
|
||||
return 230; // Bottes
|
||||
}
|
||||
|
||||
public int getDefenseForType(ArmorItem.Type type) {
|
||||
return 2; // Protection
|
||||
}
|
||||
|
||||
public int getEnchantmentValue() {
|
||||
return 14;
|
||||
}
|
||||
|
||||
public SoundEvent getEquipSound() {
|
||||
return SoundEvents.ARMOR_EQUIP_DIAMOND;
|
||||
}
|
||||
|
||||
public Ingredient getRepairIngredient() {
|
||||
return Ingredient.of(new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get()));
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "shard_diamond";
|
||||
}
|
||||
|
||||
public float getToughness() {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
public float getKnockbackResistance() {
|
||||
return 0.0f;
|
||||
}
|
||||
}, ArmorItem.Type.BOOTS, new Item.Properties());
|
||||
super(ShardDiamondArmorMaterial.INSTANCE, ArmorItem.Type.BOOTS, new Item.Properties());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +1,10 @@
|
||||
package net.mcreator.customoregen.item;
|
||||
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.ArmorItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModItems;
|
||||
|
||||
public class SharddiamondchestplateItem extends ArmorItem {
|
||||
public SharddiamondchestplateItem() {
|
||||
super(new ArmorMaterial() {
|
||||
public int getDurabilityForType(ArmorItem.Type type) {
|
||||
return 300; // Plastron
|
||||
}
|
||||
|
||||
public int getDefenseForType(ArmorItem.Type type) {
|
||||
return 7; // Protection
|
||||
}
|
||||
|
||||
public int getEnchantmentValue() {
|
||||
return 14;
|
||||
}
|
||||
|
||||
public SoundEvent getEquipSound() {
|
||||
return SoundEvents.ARMOR_EQUIP_DIAMOND;
|
||||
}
|
||||
|
||||
public Ingredient getRepairIngredient() {
|
||||
return Ingredient.of(new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get()));
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "shard_diamond";
|
||||
}
|
||||
|
||||
public float getToughness() {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
public float getKnockbackResistance() {
|
||||
return 0.0f;
|
||||
}
|
||||
}, ArmorItem.Type.CHESTPLATE, new Item.Properties());
|
||||
super(ShardDiamondArmorMaterial.INSTANCE, ArmorItem.Type.CHESTPLATE, new Item.Properties());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +1,10 @@
|
||||
package net.mcreator.customoregen.item;
|
||||
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.ArmorItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModItems;
|
||||
|
||||
public class SharddiamondhelmetItem extends ArmorItem {
|
||||
public SharddiamondhelmetItem() {
|
||||
super(new ArmorMaterial() {
|
||||
public int getDurabilityForType(ArmorItem.Type type) {
|
||||
return 250; // Casque
|
||||
}
|
||||
|
||||
public int getDefenseForType(ArmorItem.Type type) {
|
||||
return 3; // Protection
|
||||
}
|
||||
|
||||
public int getEnchantmentValue() {
|
||||
return 14;
|
||||
}
|
||||
|
||||
public SoundEvent getEquipSound() {
|
||||
return SoundEvents.ARMOR_EQUIP_DIAMOND;
|
||||
}
|
||||
|
||||
public Ingredient getRepairIngredient() {
|
||||
return Ingredient.of(new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get()));
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "shard_diamond";
|
||||
}
|
||||
|
||||
public float getToughness() {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
public float getKnockbackResistance() {
|
||||
return 0.0f;
|
||||
}
|
||||
}, ArmorItem.Type.HELMET, new Item.Properties());
|
||||
super(ShardDiamondArmorMaterial.INSTANCE, ArmorItem.Type.HELMET, new Item.Properties());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +1,10 @@
|
||||
package net.mcreator.customoregen.item;
|
||||
|
||||
import net.minecraft.world.item.crafting.Ingredient;
|
||||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.ArmorItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModItems;
|
||||
|
||||
public class SharddiamondleggingsItem extends ArmorItem {
|
||||
public SharddiamondleggingsItem() {
|
||||
super(new ArmorMaterial() {
|
||||
public int getDurabilityForType(ArmorItem.Type type) {
|
||||
return 280; // Jambières
|
||||
}
|
||||
|
||||
public int getDefenseForType(ArmorItem.Type type) {
|
||||
return 5; // Protection
|
||||
}
|
||||
|
||||
public int getEnchantmentValue() {
|
||||
return 14;
|
||||
}
|
||||
|
||||
public SoundEvent getEquipSound() {
|
||||
return SoundEvents.ARMOR_EQUIP_DIAMOND;
|
||||
}
|
||||
|
||||
public Ingredient getRepairIngredient() {
|
||||
return Ingredient.of(new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get()));
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "shard_diamond";
|
||||
}
|
||||
|
||||
public float getToughness() {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
public float getKnockbackResistance() {
|
||||
return 0.0f;
|
||||
}
|
||||
}, ArmorItem.Type.LEGGINGS, new Item.Properties());
|
||||
super(ShardDiamondArmorMaterial.INSTANCE, ArmorItem.Type.LEGGINGS, new Item.Properties());
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 264 B |
|
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 274 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1022 B |
|
Before Width: | Height: | Size: 869 B After Width: | Height: | Size: 552 B |