Fix warnings in Forge codebase.

This commit is contained in:
Lex Manos committed 2014-01-17 21:55:48 -08:00
1 parent eeeb4d37e8
commit baf95e747a
84 files changed
+94 -246

No files matched your search

@@ -3,7 +3,6 @@ package net.minecraftforge.common.util;
import java.lang.reflect.*;
import java.util.*;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.block.BlockPressurePlate.Sensitivity;
import net.minecraft.block.material.Material;
@@ -31,6 +30,7 @@ public class EnumHelper
private static boolean isSetup = false;
//Some enums are decompiled with extra arguments, so lets check for that
@SuppressWarnings("rawtypes")
private static Class[][] commonTypes =
{
{EnumAction.class},
@@ -64,6 +64,7 @@ public class EnumHelper
{
return addEnum(EnumCreatureAttribute.class, name);
}
@SuppressWarnings("rawtypes")
public static EnumCreatureType addCreatureType(String name, Class typeClass, int maxNumber, Material material, boolean peaceful)
{
return addEnum(EnumCreatureType.class, name, typeClass, maxNumber, material, peaceful);
@@ -183,6 +184,7 @@ public class EnumHelper
return addEnum(commonTypes, enumType, enumName, paramValues);
}
@SuppressWarnings("rawtypes")
public static <T extends Enum<? >> T addEnum(Class[][] map, Class<T> enumType, String enumName, Object... paramValues)
{
for (Class[] lookup : map)
@@ -6,7 +6,6 @@ import cpw.mods.fml.common.FMLCommonHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.play.client.C15PacketClientSettings;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.management.ItemInWorldManager;
import net.minecraft.stats.StatBase;
import net.minecraft.util.ChunkCoordinates;
@@ -1,12 +1,9 @@
package net.minecraftforge.common.util;
import java.util.Map;
import java.util.UUID;
import com.google.common.collect.Maps;
import com.mojang.authlib.GameProfile;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
//To be expanded for generic Mod fake players?