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

@ -53,7 +53,7 @@ public class ItemSentientArmourGem extends Item implements IMeshProvider {
ItemSentientArmour.convertPlayerArmour(type, will, player);
}
return new ActionResult<ItemStack>(EnumActionResult.PASS, player.getHeldItem(hand));
return new ActionResult<>(EnumActionResult.PASS, player.getHeldItem(hand));
}
@SideOnly(Side.CLIENT)

View file

@ -308,7 +308,7 @@ public class ItemSentientAxe extends ItemAxe implements IDemonWillWeapon, IMeshP
@Override
public List<String> getVariants() {
List<String> ret = new ArrayList<String>();
List<String> ret = new ArrayList<>();
for (EnumDemonWillType type : EnumDemonWillType.values()) {
ret.add("type=" + type.getName().toLowerCase());
}
@ -318,7 +318,7 @@ public class ItemSentientAxe extends ItemAxe implements IDemonWillWeapon, IMeshP
@Override
public List<ItemStack> getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) {
List<ItemStack> soulList = new ArrayList<ItemStack>();
List<ItemStack> soulList = new ArrayList<>();
if (killedEntity.getEntityWorld().getDifficulty() != EnumDifficulty.PEACEFUL && !(killedEntity instanceof IMob)) {
return soulList;
@ -343,7 +343,7 @@ public class ItemSentientAxe extends ItemAxe implements IDemonWillWeapon, IMeshP
//TODO: Change attack speed.
@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.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), 0));

View file

@ -307,7 +307,7 @@ public class ItemSentientPickaxe extends ItemPickaxe implements IDemonWillWeapon
@Override
public List<String> getVariants() {
List<String> ret = new ArrayList<String>();
List<String> ret = new ArrayList<>();
for (EnumDemonWillType type : EnumDemonWillType.values()) {
ret.add("type=" + type.getName().toLowerCase());
}
@ -317,7 +317,7 @@ public class ItemSentientPickaxe extends ItemPickaxe implements IDemonWillWeapon
@Override
public List<ItemStack> getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) {
List<ItemStack> soulList = new ArrayList<ItemStack>();
List<ItemStack> soulList = new ArrayList<>();
if (killedEntity.getEntityWorld().getDifficulty() != EnumDifficulty.PEACEFUL && !(killedEntity instanceof IMob)) {
return soulList;
@ -342,7 +342,7 @@ public class ItemSentientPickaxe extends ItemPickaxe implements IDemonWillWeapon
//TODO: Change attack speed.
@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.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), 0));

View file

@ -308,7 +308,7 @@ public class ItemSentientShovel extends ItemSpade implements IDemonWillWeapon, I
@Override
public List<String> getVariants() {
List<String> ret = new ArrayList<String>();
List<String> ret = new ArrayList<>();
for (EnumDemonWillType type : EnumDemonWillType.values()) {
ret.add("type=" + type.getName().toLowerCase());
}
@ -318,7 +318,7 @@ public class ItemSentientShovel extends ItemSpade implements IDemonWillWeapon, I
@Override
public List<ItemStack> getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) {
List<ItemStack> soulList = new ArrayList<ItemStack>();
List<ItemStack> soulList = new ArrayList<>();
if (killedEntity.getEntityWorld().getDifficulty() != EnumDifficulty.PEACEFUL && !(killedEntity instanceof IMob)) {
return soulList;
@ -343,7 +343,7 @@ public class ItemSentientShovel extends ItemSpade implements IDemonWillWeapon, I
//TODO: Change attack speed.
@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.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), 0));

View file

@ -283,7 +283,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IM
@Override
public List<String> getVariants() {
List<String> ret = new ArrayList<String>();
List<String> ret = new ArrayList<>();
for (EnumDemonWillType type : EnumDemonWillType.values()) {
ret.add("type=" + type.getName().toLowerCase());
}
@ -293,7 +293,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IM
@Override
public List<ItemStack> getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting) {
List<ItemStack> soulList = new ArrayList<ItemStack>();
List<ItemStack> soulList = new ArrayList<>();
if (killedEntity.getEntityWorld().getDifficulty() != EnumDifficulty.PEACEFUL && !(killedEntity instanceof IMob)) {
return soulList;
@ -318,7 +318,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IM
//TODO: Change attack speed.
@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.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", getDamageOfActivatedSword(stack), 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", this.getAttackSpeedOfSword(stack), 0));

View file

@ -55,7 +55,7 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMeshProvider, I
double filled = PlayerDemonWillHandler.addDemonWill(type, player, drain, stack);
this.drainWill(type, stack, filled, true);
return new ActionResult<ItemStack>(EnumActionResult.PASS, stack);
return new ActionResult<>(EnumActionResult.PASS, stack);
}
@Override
@ -72,7 +72,7 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMeshProvider, I
@Override
public List<String> getVariants() {
List<String> ret = new ArrayList<String>();
List<String> ret = new ArrayList<>();
for (EnumDemonWillType type : EnumDemonWillType.values()) {
ret.add("type=petty_" + type.getName().toLowerCase());
ret.add("type=lesser_" + type.getName().toLowerCase());

View file

@ -48,7 +48,7 @@ public class ItemSoulSnare extends Item implements IVariantProvider {
worldIn.spawnEntity(snare);
}
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
return new ActionResult<>(EnumActionResult.SUCCESS, stack);
}
@Override
@ -76,8 +76,8 @@ public class ItemSoulSnare extends Item implements IVariantProvider {
@Override
public List<Pair<Integer, String>> getVariants() {
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
ret.add(new ImmutablePair<Integer, String>(0, "type=soulsnare"));
List<Pair<Integer, String>> ret = new ArrayList<>();
ret.add(new ImmutablePair<>(0, "type=soulsnare"));
return ret;
}
}