Fix various issues relating to armor [Fixes #1952]

This commit is contained in:
Prospector 2020-01-12 19:17:35 -08:00
parent bcc9368bf9
commit 960b064b5a
22 changed files with 138 additions and 127 deletions

View file

@ -35,7 +35,7 @@ import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Lazy;
public enum TRArmorMaterial implements ArmorMaterial {
public enum TRArmorMaterials implements ArmorMaterial {
BRONZE(17, new int[] { 3, 6, 5, 2 }, 8, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F, () -> {
return Ingredient.ofItems(TRContent.Ingots.BRONZE.asItem());
@ -50,10 +50,9 @@ public enum TRArmorMaterial implements ArmorMaterial {
return Ingredient.ofItems(TRContent.Gems.PERIDOT.asItem());
}),
QUANTUM(75, new int[] { 3, 6, 8, 3 }, 10, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 0.0F, () -> Ingredient.EMPTY),
CLOAKING(5, new int[] { 1, 2, 3, 1 }, 0, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0F, () -> Ingredient.EMPTY),
LITHIUMBATPACK(25, new int[]{2, 5, 6, 2}, 10, SoundEvents.ITEM_ARMOR_EQUIP_TURTLE, 0.0F, () -> Ingredient.EMPTY),
LAPOTRONPACK(33, new int[]{3, 6, 8, 3}, 10, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 2.0F, () -> Ingredient.EMPTY);
CLOAKING_DEVICE(5, new int[] { 0, 2, 0, 0 }, 0, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0F, () -> Ingredient.EMPTY),
LITHIUM_BATPACK(25, new int[]{0, 5, 0, 0}, 10, SoundEvents.ITEM_ARMOR_EQUIP_TURTLE, 0.0F, () -> Ingredient.EMPTY),
LAPOTRONIC_ORBPACK(33, new int[]{0, 6, 0, 0}, 10, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 2.0F, () -> Ingredient.EMPTY);
private static final int[] MAX_DAMAGE_ARRAY = new int[]{13, 15, 16, 11};
private final int maxDamageFactor;
@ -63,8 +62,8 @@ public enum TRArmorMaterial implements ArmorMaterial {
private final float toughness;
private final Lazy<Ingredient> repairMaterial;
TRArmorMaterial(int maxDamageFactor, int[] damageReductionAmountArray, int enchantability,
SoundEvent soundEvent, float toughness, Supplier<Ingredient> repairMaterialIn) {
TRArmorMaterials(int maxDamageFactor, int[] damageReductionAmountArray, int enchantability,
SoundEvent soundEvent, float toughness, Supplier<Ingredient> repairMaterialIn) {
this.maxDamageFactor = maxDamageFactor;
this.damageReductionAmountArray = damageReductionAmountArray;
this.enchantability = enchantability;

View file

@ -50,7 +50,9 @@ import techreborn.blockentity.machine.misc.AlarmBlockEntity;
import techreborn.blockentity.machine.misc.ChargeOMatBlockEntity;
import techreborn.blockentity.machine.multiblock.*;
import techreborn.blockentity.machine.tier1.*;
import techreborn.blockentity.machine.tier3.*;
import techreborn.blockentity.machine.tier3.ChunkLoaderBlockEntity;
import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity;
import techreborn.blockentity.machine.tier3.MatterFabricatorBlockEntity;
import techreborn.blockentity.storage.energy.AdjustableSUBlockEntity;
import techreborn.blockentity.storage.energy.HighVoltageSUBlockEntity;
import techreborn.blockentity.storage.energy.LowVoltageSUBlockEntity;

View file

@ -79,8 +79,8 @@ import techreborn.client.EGui;
import techreborn.config.TechRebornConfig;
import techreborn.entities.EntityNukePrimed;
import techreborn.items.DynamicCellItem;
import techreborn.items.ItemUpgrade;
import techreborn.items.armor.ItemQuantumSuit;
import techreborn.items.UpgradeItem;
import techreborn.items.armor.QuantumSuitItem;
import techreborn.utils.InitUtils;
import javax.annotation.Nullable;
@ -151,10 +151,10 @@ public class TRContent {
public static DynamicCellItem CELL;
//Quantum Suit
public static ItemQuantumSuit QUANTUM_HELMET;
public static ItemQuantumSuit QUANTUM_CHESTPLATE;
public static ItemQuantumSuit QUANTUM_LEGGINGS;
public static ItemQuantumSuit QUANTUM_BOOTS;
public static QuantumSuitItem QUANTUM_HELMET;
public static QuantumSuitItem QUANTUM_CHESTPLATE;
public static QuantumSuitItem QUANTUM_LEGGINGS;
public static QuantumSuitItem QUANTUM_BOOTS;
// Gem armor & tools
@Nullable
@ -839,7 +839,7 @@ public class TRContent {
Upgrades(IUpgrade upgrade) {
name = this.toString().toLowerCase(Locale.ROOT);
item = new ItemUpgrade(name, upgrade);
item = new UpgradeItem(name, upgrade);
InitUtils.setup(item, name + "_upgrade");
}