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

@ -55,7 +55,7 @@ import java.util.*;
public class ClientHandler {
// Quick toggle for error suppression. Set to false if you wish to hide model errors.
public static final boolean SUPPRESS_ASSET_ERRORS = true;
public static final List<HUDElement> hudElements = new ArrayList<HUDElement>();
public static final List<HUDElement> hudElements = new ArrayList<>();
public static TextureAtlasSprite ritualStoneBlank;
public static TextureAtlasSprite ritualStoneWater;
public static TextureAtlasSprite ritualStoneFire;
@ -191,13 +191,13 @@ public class ClientHandler {
Set<ModelResourceLocation> missingVariants = ReflectionHelper.getPrivateValue(ModelLoader.class, event.getModelLoader(), "missingVariants");
// Collect all Blood Magic model errors
List<ResourceLocation> errored = new ArrayList<ResourceLocation>();
List<ResourceLocation> errored = new ArrayList<>();
for (ResourceLocation modelError : modelErrors.keySet())
if (modelError.getResourceDomain().equalsIgnoreCase(BloodMagic.MODID))
errored.add(modelError);
// Collect all Blood Magic variant errors
List<ModelResourceLocation> missing = new ArrayList<ModelResourceLocation>();
List<ModelResourceLocation> missing = new ArrayList<>();
for (ModelResourceLocation missingVariant : missingVariants)
if (missingVariant.getResourceDomain().equalsIgnoreCase(BloodMagic.MODID))
missing.add(missingVariant);
@ -228,7 +228,7 @@ public class ClientHandler {
String mc = "minecraft";
String format = "textures/%s.png";
Set<ResourceLocation> toRemove = new HashSet<ResourceLocation>();
Set<ResourceLocation> toRemove = new HashSet<>();
// Find our missing textures and mark them for removal. Cannot directly remove as it would cause a CME
if (missingTextures.containsKey(mc)) {

View file

@ -127,7 +127,7 @@ public class CraftingHandler {
if (rightUpgrade != null) {
String key = ItemHelper.LivingUpgrades.getKey(event.getRight());
ItemStack outputStack = event.getLeft().copy();
List<String> keyList = new ArrayList<String>();
List<String> keyList = new ArrayList<>();
keyList.add(key);
if (((IUpgradeTrainer) event.getLeft().getItem()).setTrainedUpgrades(outputStack, keyList)) {
event.setCost(1);

View file

@ -34,7 +34,6 @@ import WayofTime.bloodmagic.potion.BMPotionUtils;
import WayofTime.bloodmagic.util.ChatUtil;
import WayofTime.bloodmagic.util.Utils;
import WayofTime.bloodmagic.util.helper.*;
import com.google.common.base.Strings;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.EnchantmentHelper;
@ -54,7 +53,6 @@ import net.minecraft.init.MobEffects;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumParticleTypes;
@ -74,7 +72,6 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerPickupXpEvent;
import net.minecraftforge.event.world.ExplosionEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.Event.Result;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
@ -85,10 +82,10 @@ import java.util.*;
@Mod.EventBusSubscriber(modid = BloodMagic.MODID)
public class GenericHandler {
public static Map<EntityPlayer, Double> bounceMap = new HashMap<EntityPlayer, Double>();
public static Map<EntityPlayer, Integer> filledHandMap = new HashMap<EntityPlayer, Integer>();
private static Map<EntityAnimal, EntityAITarget> targetTaskMap = new HashMap<EntityAnimal, EntityAITarget>();
private static Map<EntityAnimal, EntityAIBase> attackTaskMap = new HashMap<EntityAnimal, EntityAIBase>();
public static Map<EntityPlayer, Double> bounceMap = new HashMap<>();
public static Map<EntityPlayer, Integer> filledHandMap = new HashMap<>();
private static Map<EntityAnimal, EntityAITarget> targetTaskMap = new HashMap<>();
private static Map<EntityAnimal, EntityAIBase> attackTaskMap = new HashMap<>();
@SubscribeEvent
public static void onEntityFall(LivingFallEvent event) {
@ -218,7 +215,7 @@ public class GenericHandler {
EntityAnimal animal = (EntityAnimal) event.getEntityLiving();
if (animal.isPotionActive(RegistrarBloodMagic.SACRIFICIAL_LAMB)) {
if (!targetTaskMap.containsKey(animal)) {
EntityAITarget task = new EntityAINearestAttackableTarget<EntityMob>(animal, EntityMob.class, false);
EntityAITarget task = new EntityAINearestAttackableTarget<>(animal, EntityMob.class, false);
EntityAIBase attackTask = new EntityAIAttackMelee(animal, 1.0D, false);
animal.targetTasks.addTask(1, task);
animal.tasks.addTask(1, attackTask);

View file

@ -37,7 +37,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
@Mod.EventBusSubscriber(modid = BloodMagic.MODID)
public class WillHandler {
private static final HashMap<Integer, Integer> SERVER_TICKS = new HashMap<Integer, Integer>();
private static final HashMap<Integer, Integer> SERVER_TICKS = new HashMap<>();
// Adds Will to player
@SubscribeEvent