Add jeremium armour
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
6
src/main/resources/assets/gamermod/models/item/jeremium_boots.json
Executable file
6
src/main/resources/assets/gamermod/models/item/jeremium_boots.json
Executable file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "gamermod:item/jeremium_boots"
|
||||
}
|
||||
}
|
||||
6
src/main/resources/assets/gamermod/models/item/jeremium_chestplate.json
Executable file
6
src/main/resources/assets/gamermod/models/item/jeremium_chestplate.json
Executable file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "gamermod:item/jeremium_chestplate"
|
||||
}
|
||||
}
|
||||
6
src/main/resources/assets/gamermod/models/item/jeremium_helmet.json
Executable file
6
src/main/resources/assets/gamermod/models/item/jeremium_helmet.json
Executable file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "gamermod:item/jeremium_helmet"
|
||||
}
|
||||
}
|
||||
6
src/main/resources/assets/gamermod/models/item/jeremium_leggings.json
Executable file
6
src/main/resources/assets/gamermod/models/item/jeremium_leggings.json
Executable 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 |
Reference in New Issue
Block a user