Cleaned up a lot of different inspections

This commit is contained in:
Nicholas Ignoffo 2018-03-01 19:27:38 -08:00
parent 0dd0854bd9
commit 70d98455b7
207 changed files with 603 additions and 731 deletions

View file

@ -51,7 +51,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
public static final boolean useSpecialArmourCalculation = true;
public static String[] names = {"helmet", "chest", "legs", "boots"};
//TODO: Save/delete cache periodically.
public static Map<UUID, LivingArmour> armourMap = new HashMap<UUID, LivingArmour>();
public static Map<UUID, LivingArmour> armourMap = new HashMap<>();
private static Field _FLAGS = ReflectionHelper.findField(Entity.class, "FLAGS", "field_184240_ax");
private static DataParameter<Byte> FLAGS = null;
@ -283,9 +283,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
if (FLAGS == null) {
try {
FLAGS = (DataParameter<Byte>) _FLAGS.get(null);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
} catch (IllegalArgumentException | IllegalAccessException e) {
e.printStackTrace();
}
}
@ -337,7 +335,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
return armour.getAttributeModifiers();
}
return HashMultimap.<String, AttributeModifier>create();
return HashMultimap.create();
}
@Override
@ -367,7 +365,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
@Override
public List<String> getVariants() {
List<String> ret = new ArrayList<String>();
List<String> ret = new ArrayList<>();
ret.add("armour=head");
ret.add("armour=body");
ret.add("armour=leg");

View file

@ -298,7 +298,7 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
@Override
public List<String> getVariants() {
List<String> ret = new ArrayList<String>();
List<String> ret = new ArrayList<>();
for (EnumDemonWillType type : EnumDemonWillType.values()) {
String additional = "_" + type.getName().toLowerCase();
@ -313,7 +313,7 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
@Override
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) {
Multimap<String, AttributeModifier> multimap = HashMultimap.<String, AttributeModifier>create();
Multimap<String, AttributeModifier> multimap = HashMultimap.create();
if (slot == EntityEquipmentSlot.CHEST) {
multimap.put(SharedMonsterAttributes.MAX_HEALTH.getName(), new AttributeModifier(new UUID(0, 318145), "Armor modifier", this.getHealthBonus(stack), 0));
multimap.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getName(), new AttributeModifier(new UUID(0, 8145), "Armor modifier", this.getKnockbackResistance(stack), 0));