Add jeremium armour

This commit is contained in:
RyanTLG
2022-04-03 21:32:02 +02:00
parent 2dc4f7eaf9
commit 0775acf2d0
11 changed files with 116 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
package net.arcmods.ryantlg.armourMaterials;
import net.arcmods.ryantlg.items.metalItems.jeremiumMetals;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.recipe.Ingredient;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
public class JeremiumArmorMaterial implements ArmorMaterial{
// {boots, leggings, chestplate, helmet}
private static final int[] BASE_DURABILITY = new int[] {120, 129, 135, 121};
private static final int[] PROTECTION_VALUES = new int[] {6, 12, 14, 7};
// In which A is helmet, B chestplate, C leggings and D boots.
// For reference, Leather uses {1, 2, 3, 1}, and Diamond/Netherite {3, 6, 8, 3}
// {A, C, B, D}
@Override
public int getDurability(EquipmentSlot slot) {
return BASE_DURABILITY[slot.getEntitySlotId()] * 10;
}
@Override
public int getProtectionAmount(EquipmentSlot slot) {
return PROTECTION_VALUES[slot.getEntitySlotId()];
}
@Override
public int getEnchantability() {
return 43;
}
@Override
public SoundEvent getEquipSound() {
return SoundEvents.ITEM_ARMOR_EQUIP_NETHERITE;
}
@Override
public Ingredient getRepairIngredient() {
return Ingredient.ofItems(jeremiumMetals.JEREMIUM);
}
@Override
public String getName() {
// Must be all lowercase
return "jeremium";
}
@Override
public float getToughness() {
return 5.0F;
}
@Override
public float getKnockbackResistance() {
return 3.0F;
}
}

View File

@@ -5,6 +5,7 @@ import net.arcmods.ryantlg.blocks.FunnyBlocks;
import net.arcmods.ryantlg.blocks.jeremiumBlocks;
import net.arcmods.ryantlg.blocks.omniumBlocks;
import net.arcmods.ryantlg.blocks.oriumBlocks;
import net.arcmods.ryantlg.items.armour.jeremiumArmour;
import net.arcmods.ryantlg.items.armour.omniumArmour;
import net.arcmods.ryantlg.items.armour.oriumArmour;
import net.arcmods.ryantlg.items.itemsByCrop.weemItems;
@@ -97,6 +98,7 @@ public class gamermod implements ModInitializer {
jeremiumMetals.register();
jeremiumBlocks.register();
jeremiumArmour.register();
}
}

View File

@@ -0,0 +1,31 @@
package net.arcmods.ryantlg.items.armour;
import net.arcmods.ryantlg.gamermod;
import net.arcmods.ryantlg.armourMaterials.JeremiumArmorMaterial;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.item.Item;
import net.minecraft.util.Identifier;
import net.minecraft.util.Rarity;
import net.minecraft.util.registry.Registry;
public class jeremiumArmour {
public static final ArmorMaterial JEREMIUM_ARMOR_MATERIAL = new JeremiumArmorMaterial();
public static final Item JEREMIUM_HELMET = new ArmorItem(JEREMIUM_ARMOR_MATERIAL, EquipmentSlot.HEAD, new Item.Settings().group(gamermod.THING).fireproof().rarity(Rarity.EPIC));
public static final Item JEREMIUM_CHESTPLATE = new ArmorItem(JEREMIUM_ARMOR_MATERIAL, EquipmentSlot.CHEST, new Item.Settings().group(gamermod.THING).fireproof().rarity(Rarity.EPIC));
public static final Item JEREMIUM_LEGGINGS = new ArmorItem(JEREMIUM_ARMOR_MATERIAL, EquipmentSlot.LEGS, new Item.Settings().group(gamermod.THING).fireproof().rarity(Rarity.EPIC));
public static final Item JEREMIUM_BOOTS = new ArmorItem(JEREMIUM_ARMOR_MATERIAL, EquipmentSlot.FEET, new Item.Settings().group(gamermod.THING).fireproof().rarity(Rarity.EPIC));
public static void register() {
Registry.register(Registry.ITEM, new Identifier("gamermod", "jeremium_helmet"), JEREMIUM_HELMET);
Registry.register(Registry.ITEM, new Identifier("gamermod", "jeremium_chestplate"), JEREMIUM_CHESTPLATE);
Registry.register(Registry.ITEM, new Identifier("gamermod", "jeremium_leggings"), JEREMIUM_LEGGINGS);
Registry.register(Registry.ITEM, new Identifier("gamermod", "jeremium_boots"), JEREMIUM_BOOTS);
gamermod.LOGGER.info("jeremiumArmour loaded");
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "gamermod:item/jeremium_boots"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "gamermod:item/jeremium_chestplate"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "gamermod:item/jeremium_helmet"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "gamermod:item/jeremium_leggings"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB