Fix warnings in Forge codebase.

This commit is contained in:
Lex Manos 2014-01-17 21:55:48 -08:00
parent eeeb4d37e8
commit baf95e747a
84 changed files with 94 additions and 246 deletions

View File

@ -1,6 +1,7 @@
package ibxm;
@SuppressWarnings("unused")
public class Channel {
public int pattern_loop_row;
@ -10,7 +11,7 @@ public class Channel {
private int[] global_volume, current_note;
private boolean linear_periods, fast_volume_slides, key_on, silent;
private int sample_idx, sample_frac, step, left_gain, right_gain;
private int volume, panning, fine_tune, period, porta_period, key_add;
private int volume, panning, fine_tune, period, porta_period, key_add;
private int tremolo_speed, tremolo_depth, tremolo_tick, tremolo_wave, tremolo_add;
private int vibrato_speed, vibrato_depth, vibrato_tick, vibrato_wave, vibrato_add;
private int volume_slide_param, portamento_param, retrig_param;

View File

@ -10,7 +10,8 @@ public class Envelope {
set_num_points( 1 );
}
public void set_num_points( int num_points ) {
@SuppressWarnings("unused")
public void set_num_points( int num_points ) {
int point;
if( num_points <= 0 ) {
num_points = 1;

View File

@ -69,7 +69,8 @@ public class FastTracker2 {
return module;
}
private static Pattern read_xm_pattern( DataInput data_input, int num_channels ) throws IOException {
@SuppressWarnings("unused")
private static Pattern read_xm_pattern( DataInput data_input, int num_channels ) throws IOException {
int pattern_header_length, packing_type, num_rows, pattern_data_length;
byte[] structure_header, pattern_header, pattern_data;
Pattern pattern;

View File

@ -85,7 +85,8 @@ public class IBXM {
clear_vol_ramp_buffer();
}
public void seek( int sample_position ) {
@SuppressWarnings("unused")
public void seek( int sample_position ) {
int idx;
set_sequence_index( 0, 0 );
next_tick();

View File

@ -104,7 +104,8 @@ public class Player {
}
private class Driver implements Runnable {
public void run() {
@Override
public void run() {
if( running ) return;
try {
output_line.open();

View File

@ -57,7 +57,8 @@ public class ScreamTracker3 {
return s3m_identifier.equals( "SCRM" );
}
public static Module load_s3m( byte[] header_96_bytes, DataInput data_input ) throws IOException {
@SuppressWarnings("unused")
public static Module load_s3m( byte[] header_96_bytes, DataInput data_input ) throws IOException {
int num_pattern_orders, num_instruments, num_patterns, num_channels;
int flags, tracker_version, master_volume, panning, channel_config, sequence_length;
int instrument_idx, pattern_idx, channel_idx, order_idx, panning_offset;

View File

@ -113,6 +113,7 @@ public class ClientCommandHandler extends CommandHandler
Minecraft mc = FMLClientHandler.instance().getClient();
if (mc.currentScreen instanceof GuiChat)
{
@SuppressWarnings("unchecked")
List<String> commands = getPossibleCommands(mc.thePlayer, leftOfCursor);
if (commands != null && !commands.isEmpty())
{

View File

@ -8,7 +8,7 @@ import net.minecraftforge.common.util.EnumHelper;
public class EnumHelperClient extends EnumHelper
{
@SuppressWarnings("rawtypes")
private static Class[][] clentTypes =
{
{GameType.class, int.class, String.class},

View File

@ -1,15 +1,6 @@
package net.minecraftforge.client;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.TreeSet;
import javax.imageio.ImageIO;
import net.minecraftforge.client.event.MouseEvent;
@ -24,32 +15,20 @@ import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import org.lwjgl.opengl.PixelFormat;
import com.google.common.io.ByteStreams;
import com.google.gson.Gson;
import com.google.gson.JsonParseException;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.versioning.ArtifactVersion;
import cpw.mods.fml.common.versioning.DefaultArtifactVersion;
import net.minecraft.client.Minecraft;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLiquid;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.client.model.ModelBiped;
@ -69,15 +48,13 @@ import net.minecraftforge.common.ForgeModContainer;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.common.ForgeVersion.Status;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.RenderBlockFluid;
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*;
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
import static net.minecraftforge.common.ForgeVersion.Status.*;
public class ForgeHooksClient
{
private static final ResourceLocation ITEM_GLINT = new ResourceLocation("textures/misc/enchanted_item_glint.png");
//private static final ResourceLocation ITEM_GLINT = new ResourceLocation("textures/misc/enchanted_item_glint.png");
static TextureManager engine()
{

View File

@ -6,7 +6,6 @@ import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
@ -17,7 +16,6 @@ import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -36,7 +34,6 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.FoodStats;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import net.minecraft.util.StringUtils;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.chunk.Chunk;
@ -52,9 +49,9 @@ import cpw.mods.fml.common.FMLCommonHandler;
public class GuiIngameForge extends GuiIngame
{
private static final ResourceLocation VIGNETTE = new ResourceLocation("textures/misc/vignette.png");
//private static final ResourceLocation VIGNETTE = new ResourceLocation("textures/misc/vignette.png");
private static final ResourceLocation WIDGITS = new ResourceLocation("textures/gui/widgets.png");
private static final ResourceLocation PUMPKIN_BLUR = new ResourceLocation("textures/misc/pumpkinblur.png");
//private static final ResourceLocation PUMPKIN_BLUR = new ResourceLocation("textures/misc/pumpkinblur.png");
private static final int WHITE = 0xFFFFFF;
@ -378,7 +375,7 @@ public class GuiIngameForge extends GuiIngame
for (int i = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F) - 1; i >= 0; --i)
{
int b0 = (highlight ? 1 : 0);
//int b0 = (highlight ? 1 : 0);
int row = MathHelper.ceiling_float_int((float)(i + 1) / 10.0F) - 1;
int x = left + i % 10 * 8;
int y = top - row * rowHeight;
@ -758,6 +755,7 @@ public class GuiIngameForge extends GuiIngame
mc.mcProfiler.endSection();
}
@SuppressWarnings("unchecked")
protected void renderPlayerList(int width, int height)
{
ScoreObjective scoreobjective = this.mc.theWorld.getScoreboard().func_96539_a(0);
@ -767,7 +765,7 @@ public class GuiIngameForge extends GuiIngame
{
if (pre(PLAYER_LIST)) return;
this.mc.mcProfiler.startSection("playerList");
List players = handler.field_147303_b;
List<GuiPlayerInfo> players = (List<GuiPlayerInfo>)handler.field_147303_b;
int maxPlayers = handler.field_147304_c;
int rows = maxPlayers;
int columns = 1;

View File

@ -1,9 +1,6 @@
package net.minecraftforge.client;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.EntityLiving;
import net.minecraft.item.ItemStack;
import net.minecraft.client.renderer.RenderBlocks;
public interface IItemRenderer
{

View File

@ -8,18 +8,11 @@ package net.minecraftforge.client;
import java.util.BitSet;
import java.util.IdentityHashMap;
import org.lwjgl.opengl.Display;
import com.google.common.collect.Maps;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.World;
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
import net.minecraftforge.common.MinecraftForge;
public class MinecraftForgeClient
{

View File

@ -2,7 +2,6 @@ package net.minecraftforge.client.event;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.EntityRenderer;
/**
* Author: MachineMuse (Claire Semple)

View File

@ -1,9 +1,6 @@
package net.minecraftforge.client.event.sound;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.Entity;
import net.minecraft.client.audio.SoundManager;
import net.minecraft.client.audio.SoundPoolEntry;
import net.minecraftforge.common.MinecraftForge;

View File

@ -1,6 +1,5 @@
package net.minecraftforge.client.model;
import java.net.URL;
import java.util.Collection;
import java.util.Map;

View File

@ -1,8 +1,5 @@
package net.minecraftforge.client.model;
import java.io.InputStream;
import java.net.URL;
import net.minecraft.util.ResourceLocation;
/**

View File

@ -8,6 +8,8 @@ package net.minecraftforge.client.model;
*/
public class ModelFormatException extends RuntimeException {
private static final long serialVersionUID = 2023547503969671835L;
public ModelFormatException()
{
super();

View File

@ -1,8 +1,5 @@
package net.minecraftforge.client.model.obj;
import java.io.InputStream;
import java.net.URL;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelCustom;
import net.minecraftforge.client.model.IModelCustomLoader;

View File

@ -4,7 +4,6 @@ import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -249,6 +248,7 @@ public class WavefrontObject implements IModelCustom
}
}
@Override
public void renderAllExcept(String... excludedGroupNames)
{
for (GroupObject groupObject : groupObjects)

View File

@ -1,12 +1,8 @@
package net.minecraftforge.client.model.techne;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashMap;
@ -14,15 +10,12 @@ import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
import javax.imageio.ImageIO;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.lwjgl.opengl.GL11;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@ -39,11 +32,11 @@ import net.minecraft.client.resources.IResource;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelCustom;
import net.minecraftforge.client.model.ModelFormatException;
import net.minecraftforge.client.model.obj.GroupObject;
/**
* Techne model importer, based on iChun's Hats importer
*/
@SuppressWarnings("unused")
@SideOnly(Side.CLIENT)
public class TechneModel extends ModelBase implements IModelCustom {
public static final List<String> cubeTypes = Arrays.asList(

View File

@ -1,9 +1,5 @@
package net.minecraftforge.client.model.techne;
import java.net.URL;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelCustom;
import net.minecraftforge.client.model.IModelCustomLoader;

View File

@ -31,6 +31,7 @@ public class BiomeDictionary
private static final int BIOME_LIST_SIZE = 256;
private static BiomeInfo[] biomeList = new BiomeInfo[BIOME_LIST_SIZE];
@SuppressWarnings("unchecked")
private static ArrayList<BiomeGenBase>[] typeInfoList = new ArrayList[Type.values().length];
private static class BiomeInfo

View File

@ -1,24 +1,17 @@
package net.minecraftforge.common;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.ChunkProviderGenerate;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.structure.MapGenStronghold;
import net.minecraft.world.gen.structure.MapGenVillage;
import net.minecraft.world.biome.WorldChunkManager;
import com.google.common.collect.Lists;
public class BiomeManager
{
public static ArrayList<BiomeGenBase> strongHoldBiomes = new ArrayList<BiomeGenBase>();
public static ArrayList<BiomeGenBase> strongHoldBiomesBlackList = new ArrayList<BiomeGenBase>();
@SuppressWarnings("unchecked")
public static void addVillageBiome(BiomeGenBase biome, boolean canSpawn)
{
if (!MapGenVillage.villageSpawnBiomes.contains(biome))
@ -29,6 +22,7 @@ public class BiomeManager
}
}
@SuppressWarnings("unchecked")
public static void removeVillageBiome(BiomeGenBase biome)
{
if (MapGenVillage.villageSpawnBiomes.contains(biome))

View File

@ -140,11 +140,11 @@ public class ChestGenHooks
public static void removeItem(String category, ItemStack item){ getInfo(category).removeItem(item); }
public static ItemStack getOneItem(String category, Random rand){ return getInfo(category).getOneItem(rand); }
@SuppressWarnings("unused")
private String category;
private int countMin = 0;
private int countMax = 0;
//TO-DO: Privatize this once again when we remove the Deprecated stuff in DungeonHooks
ArrayList<WeightedRandomChestContent> contents = new ArrayList<WeightedRandomChestContent>();
private ArrayList<WeightedRandomChestContent> contents = new ArrayList<WeightedRandomChestContent>();
public ChestGenHooks(String category)
{

View File

@ -4,32 +4,23 @@ import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import org.apache.logging.log4j.Level;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.ImmutableListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
import com.google.common.collect.Maps;
import com.google.common.collect.Multiset;
import com.google.common.collect.Sets;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.MinecraftException;
import net.minecraft.world.World;
import net.minecraft.world.WorldManager;

View File

@ -3,15 +3,7 @@ package net.minecraftforge.common;
import java.util.ArrayList;
import java.util.Random;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandom;
import net.minecraft.util.WeightedRandomChestContent;
import static net.minecraftforge.common.ChestGenHooks.DUNGEON_CHEST;
public class DungeonHooks
{

View File

@ -1,12 +1,8 @@
package net.minecraftforge.common;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -14,33 +10,23 @@ import java.util.UUID;
import org.apache.logging.log4j.Level;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.BiMap;
import com.google.common.collect.ForwardingSet;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableListMultimap;
import com.google.common.collect.ImmutableMultiset;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSetMultimap;
import com.google.common.collect.LinkedHashMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.google.common.collect.Multimaps;
import com.google.common.collect.Multiset;
import com.google.common.collect.Multisets;
import com.google.common.collect.SetMultimap;
import com.google.common.collect.Sets;
import com.google.common.collect.TreeMultiset;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
@ -51,14 +37,11 @@ import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.ForgeChunkManager.Ticket;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
@ -196,7 +179,7 @@ public class ForgeChunkManager
private NBTTagCompound modData;
public final World world;
private int maxDepth;
private String entityClazz;
//private String entityClazz;
private int entityChunkX;
private int entityChunkZ;
private Entity entity;
@ -339,7 +322,7 @@ public class ForgeChunkManager
/**
* Gets a list of requested chunks for this ticket.
*/
public ImmutableSet getChunkList()
public ImmutableSet<ChunkCoordIntPair> getChunkList()
{
return ImmutableSet.copyOf(requestedChunks);
}
@ -451,7 +434,7 @@ public class ForgeChunkManager
NBTTagCompound ticket = (NBTTagCompound) tickets.func_150305_b(j);
modId = ticket.hasKey("ModId") ? ticket.getString("ModId") : modId;
Type type = Type.values()[ticket.getByte("Type")];
byte ticketChunkDepth = ticket.getByte("ChunkListDepth");
//byte ticketChunkDepth = ticket.getByte("ChunkListDepth");
Ticket tick = new Ticket(modId, type, world);
if (ticket.hasKey("ModData"))
{
@ -900,6 +883,7 @@ public class ForgeChunkManager
}
}
@SuppressWarnings("unchecked")
public static Chunk fetchDormantChunk(long coords, World world)
{
Cache<Long, Chunk> cache = dormantChunkCache.get(world);
@ -910,7 +894,7 @@ public class ForgeChunkManager
Chunk chunk = cache.getIfPresent(coords);
if (chunk != null)
{
for (List<Entity> eList : chunk.entityLists)
for (List<Entity> eList : (List<Entity>[])chunk.entityLists)
{
for (Entity e: eList)
{
@ -979,8 +963,8 @@ public class ForgeChunkManager
{
continue;
}
Property modTC = config.get(mod, "maximumTicketCount", 200);
Property modCPT = config.get(mod, "maximumChunksPerTicket", 25);
config.get(mod, "maximumTicketCount", 200);
config.get(mod, "maximumChunksPerTicket", 25);
}
}

View File

@ -1,19 +1,12 @@
package net.minecraftforge.common;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.relauncher.ReflectionHelper;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFlower;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
@ -21,10 +14,8 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
@ -42,8 +33,6 @@ import net.minecraft.util.MovingObjectPosition.MovingObjectType;
import net.minecraft.util.WeightedRandom;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings.GameType;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.event.entity.item.ItemTossEvent;
import net.minecraftforge.event.entity.living.LivingAttackEvent;

View File

@ -1,7 +1,5 @@
package net.minecraftforge.common;
import java.util.UUID;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -10,7 +8,6 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.*;
import net.minecraftforge.event.entity.*;
import net.minecraftforge.event.world.WorldEvent;

View File

@ -9,8 +9,6 @@ import static net.minecraftforge.common.config.Configuration.CATEGORY_GENERAL;
import java.io.File;
import java.util.Arrays;
import java.util.Map;
import java.util.logging.Level;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
@ -41,7 +39,6 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
public class ForgeModContainer extends DummyModContainer implements WorldAccessContainer
{

View File

@ -80,6 +80,7 @@ public class ForgeVersion
{
new Thread("Forge Version Check")
{
@SuppressWarnings("unchecked")
@Override
public void run()
{
@ -91,7 +92,7 @@ public class ForgeVersion
con.close();
Map<String, Object> json = new Gson().fromJson(data, Map.class);
String homepage = (String)json.get("homepage");
//String homepage = (String)json.get("homepage");
Map<String, String> promos = (Map<String, String>)json.get("promos");
String rec = promos.get(MinecraftForge.MC_VERSION + "-recommended");

View File

@ -2,7 +2,6 @@ package net.minecraftforge.common;
import net.minecraft.block.Block;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public interface IPlantable
{

View File

@ -2,9 +2,7 @@ package net.minecraftforge.common;
import java.util.ArrayList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
/**

View File

@ -293,6 +293,7 @@ public interface ISpecialArmor
}
}
@Override
public int compareTo(ArmorProperties o)
{
if (o.Priority != Priority)
@ -304,6 +305,7 @@ public interface ISpecialArmor
return (int)(left - right);
}
@Override
public String toString()
{
return String.format("%d, %d, %f, %d", Priority, AbsorbMax, AbsorbRatio, (AbsorbRatio == 0 ? 0 : (int)(AbsorbMax * 100.0D / AbsorbRatio)));

View File

@ -1,24 +1,10 @@
package net.minecraftforge.common;
import java.lang.reflect.Constructor;
import java.util.*;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.eventhandler.EventBus;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.crash.CrashReport;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.ForgeHooks.SeedEntry;
import net.minecraftforge.event.entity.EntityEvent;
import net.minecraftforge.oredict.OreDictionary;
public class MinecraftForge

View File

@ -15,6 +15,7 @@ import net.minecraft.world.WorldServer;
public class WorldSpecificSaveHandler implements ISaveHandler
{
@SuppressWarnings("unused")
private WorldServer world;
private ISaveHandler parent;
private File dataDir;

View File

@ -39,6 +39,7 @@ public class ConfigCategory implements Map<String, Property>
}
}
@Override
public boolean equals(Object obj)
{
if (obj instanceof ConfigCategory)

View File

@ -22,7 +22,6 @@ import java.io.OutputStreamWriter;
import java.io.PushbackInputStream;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
@ -30,13 +29,9 @@ import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import com.google.common.base.CharMatcher;
import com.google.common.collect.ImmutableSet;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.relauncher.FMLInjectionData;
@ -693,6 +688,7 @@ public class Configuration
public static class UnicodeInputStreamReader extends Reader
{
private final InputStreamReader input;
@SuppressWarnings("unused")
private final String defaultEnc;
public UnicodeInputStreamReader(InputStream source, String encoding) throws IOException

View File

@ -7,8 +7,6 @@ package net.minecraftforge.common.config;
import java.util.ArrayList;
import net.minecraftforge.common.config.Property.Type;
public class Property
{
public enum Type

View File

@ -1,13 +1,8 @@
package net.minecraftforge.common.network;
import java.util.Map;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import cpw.mods.fml.common.network.ByteBufUtils;
import net.minecraftforge.fluids.FluidRegistry;
import io.netty.buffer.ByteBuf;
public abstract class ForgeMessage {

View File

@ -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)

View File

@ -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;

View File

@ -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?

View File

@ -15,6 +15,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.EntityStruckByLightningEvent;
import net.minecraftforge.event.entity.living.LivingPackSizeEvent;
@ -29,7 +30,6 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.WorldEvent;
@SuppressWarnings("deprecation")
public class ForgeEventFactory
{
public static boolean doPlayerHarvestCheck(EntityPlayer player, Block block, boolean success)
@ -76,7 +76,7 @@ public class ForgeEventFactory
return event.getResult();
}
public static List getPotentialSpawns(WorldServer world, EnumCreatureType type, int x, int y, int z, List oldList)
public static List<BiomeGenBase.SpawnListEntry> getPotentialSpawns(WorldServer world, EnumCreatureType type, int x, int y, int z, List<BiomeGenBase.SpawnListEntry> oldList)
{
WorldEvent.PotentialSpawns event = new WorldEvent.PotentialSpawns(world, type, x, y, z, oldList);
if (MinecraftForge.EVENT_BUS.post(event))

View File

@ -2,7 +2,6 @@ package net.minecraftforge.event.entity;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;
public class EntityEvent extends Event
{

View File

@ -2,7 +2,6 @@ package net.minecraftforge.event.entity.item;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.entity.item.EntityItem;
import net.minecraftforge.event.entity.EntityEvent;
/**
* Event that is fired when an EntityItem's age has reached its maximum

View File

@ -3,7 +3,6 @@ package net.minecraftforge.event.entity.item;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.event.entity.EntityEvent;
/**
* Event that is fired whenever a player tosses (Q) an item or drag-n-drops a

View File

@ -1,8 +1,6 @@
package net.minecraftforge.event.entity.living;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
/**

View File

@ -1,7 +1,6 @@
package net.minecraftforge.event.entity.living;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event.HasResult;
import net.minecraft.entity.EntityLiving;
import net.minecraft.world.World;

View File

@ -1,7 +1,5 @@
package net.minecraftforge.event.entity.living;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.world.World;

View File

@ -1,6 +1,5 @@
package net.minecraftforge.event.entity.minecart;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityMinecart;
import net.minecraftforge.event.entity.EntityEvent;

View File

@ -2,7 +2,6 @@ package net.minecraftforge.event.entity.player;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
@ -20,9 +19,7 @@ public class EntityItemPickupEvent extends PlayerEvent
*
* setResult(ALLOW) is the same as the old setHandled()
*/
public final EntityItem item;
private boolean handled = false;
public EntityItemPickupEvent(EntityPlayer player, EntityItem item)
{

View File

@ -2,7 +2,6 @@ package net.minecraftforge.event.entity.player;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.event.entity.living.LivingEvent;

View File

@ -1,6 +1,5 @@
package net.minecraftforge.event.entity.player;
import cpw.mods.fml.common.eventhandler.Cancelable;
import net.minecraft.entity.player.EntityPlayer;
/**

View File

@ -1,10 +1,7 @@
package net.minecraftforge.event.entity.player;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import static cpw.mods.fml.common.eventhandler.Event.Result;
import static cpw.mods.fml.common.eventhandler.Event.Result.*;
@Cancelable

View File

@ -26,8 +26,6 @@ public class UseHoeEvent extends PlayerEvent
public final int y;
public final int z;
private boolean handeled = false;
public UseHoeEvent(EntityPlayer player, ItemStack current, World world, int x, int y, int z)
{
super(player);

View File

@ -1,14 +1,9 @@
package net.minecraftforge.event.terraingen;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeDecorator;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.event.*;
public class BiomeEvent extends Event
{

View File

@ -4,7 +4,6 @@ import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraftforge.event.*;
public class ChunkProviderEvent extends Event
{

View File

@ -5,7 +5,6 @@ import java.util.Random;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.world.World;
import net.minecraftforge.event.*;
public class DecorateBiomeEvent extends Event
{

View File

@ -2,7 +2,6 @@ package net.minecraftforge.event.terraingen;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.world.gen.MapGenBase;
import net.minecraftforge.event.*;
public class InitMapGenEvent extends Event
{

View File

@ -6,7 +6,6 @@ import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.event.*;
public class OreGenEvent extends Event
{

View File

@ -4,7 +4,6 @@ import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraftforge.event.world.*;
public class PopulateChunkEvent extends ChunkProviderEvent
{

View File

@ -12,7 +12,6 @@ import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.common.*;
import net.minecraftforge.event.terraingen.DecorateBiomeEvent.*;
import net.minecraftforge.event.terraingen.OreGenEvent.*;
import net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.*;
import net.minecraftforge.event.terraingen.PopulateChunkEvent.*;
public abstract class TerrainGen

View File

@ -1,8 +1,6 @@
package net.minecraftforge.event.world;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
public class ChunkEvent extends WorldEvent
{

View File

@ -3,7 +3,6 @@ package net.minecraftforge.event.world;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.WorldServer;
public class ChunkWatchEvent extends Event
{

View File

@ -5,7 +5,6 @@ import java.util.List;
import cpw.mods.fml.common.eventhandler.Cancelable;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
@ -47,7 +46,7 @@ public class WorldEvent extends Event
public final int z;
public final List<SpawnListEntry> list;
public PotentialSpawns(World world, EnumCreatureType type, int x, int y, int z, List oldList)
public PotentialSpawns(World world, EnumCreatureType type, int x, int y, int z, List<SpawnListEntry> oldList)
{
super(world);
this.x = x;
@ -56,7 +55,7 @@ public class WorldEvent extends Event
this.type = type;
if (oldList != null)
{
this.list = (List<SpawnListEntry>)oldList;
this.list = oldList;
}
else
{

View File

@ -20,6 +20,7 @@ import net.minecraft.world.World;
* @author King Lemming, OvermindDL1
*
*/
@SuppressWarnings("unused")
public abstract class BlockFluidBase extends Block implements IFluidBlock
{
/*

View File

@ -15,6 +15,7 @@ import net.minecraft.world.World;
* @author King Lemming
*
*/
@SuppressWarnings("unused")
public class BlockFluidClassic extends BlockFluidBase
{
/*

View File

@ -16,6 +16,7 @@ import net.minecraft.world.World;
* @author OvermindDL1, KingLemming
*
*/
@SuppressWarnings("unused")
public class BlockFluidFinite extends BlockFluidBase
{
public BlockFluidFinite(int id, Fluid fluid, Material material)

View File

@ -9,7 +9,6 @@ import java.util.Map;
import java.util.Set;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -24,6 +23,7 @@ import net.minecraftforge.common.MinecraftForge;
* @author King Lemming
*
*/
@SuppressWarnings("unused")
public abstract class FluidContainerRegistry
{
/*

View File

@ -11,6 +11,7 @@ import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
@SuppressWarnings("unused")
public class FluidIdMapPacket// extends ForgePacket
{
/*

View File

@ -19,6 +19,7 @@ import cpw.mods.fml.common.eventhandler.Event;
* @author King Lemming, CovertJaguar (LiquidDictionary)
*
*/
@SuppressWarnings("unused")
public abstract class FluidRegistry
{
/*

View File

@ -16,6 +16,7 @@ import net.minecraft.nbt.NBTTagCompound;
* @author King Lemming, SirSengir (LiquidStack)
*
*/
@SuppressWarnings("unused")
public class FluidStack
{
/*

View File

@ -10,6 +10,7 @@ import net.minecraft.tileentity.TileEntity;
* @author King Lemming, cpw (LiquidTank)
*
*/
@SuppressWarnings("unused")
public class FluidTank implements IFluidTank
{
@Override public FluidStack getFluid() { return null; }

View File

@ -10,6 +10,7 @@ import net.minecraft.nbt.NBTTagCompound;
* @author King Lemming
*
*/
@SuppressWarnings("unused")
public class ItemFluidContainer extends Item implements IFluidContainerItem
{
@Override public FluidStack getFluid(ItemStack container){ return null; }

View File

@ -14,6 +14,7 @@ import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
* @author King Lemming
*
*/
@SuppressWarnings("unused")
public class RenderBlockFluid implements ISimpleBlockRenderingHandler
{
@Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {}

View File

@ -11,6 +11,7 @@ import net.minecraftforge.common.util.ForgeDirection;
* @author King Lemming
*
*/
@SuppressWarnings("unused")
public class TileFluidHandler extends TileEntity implements IFluidHandler
{
@Override public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { return 0; }

View File

@ -2,7 +2,6 @@ package net.minecraftforge.oredict;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@ -37,6 +36,7 @@ public class OreDictionary
initVanillaEntries();
}
@SuppressWarnings("unchecked")
public static void initVanillaEntries()
{
if (!hasInit)
@ -140,7 +140,7 @@ public class OreDictionary
new ItemStack(Blocks.dark_oak_stairs)
};
List recipes = CraftingManager.getInstance().getRecipeList();
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
List<IRecipe> recipesToRemove = new ArrayList<IRecipe>();
List<IRecipe> recipesToAdd = new ArrayList<IRecipe>();

View File

@ -1,10 +1,7 @@
package net.minecraftforge.oredict;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -14,13 +11,9 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import cpw.mods.fml.common.DummyModContainer;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.toposort.TopologicalSort;
import cpw.mods.fml.common.toposort.TopologicalSort.DirectedGraph;
import cpw.mods.fml.common.versioning.ArtifactVersion;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.RecipeFireworks;
@ -31,6 +24,7 @@ import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.item.crafting.ShapelessRecipes;
import static net.minecraftforge.oredict.RecipeSorter.Category.*;
@SuppressWarnings("rawtypes")
public class RecipeSorter implements Comparator<IRecipe>
{
public enum Category
@ -43,12 +37,12 @@ public class RecipeSorter implements Comparator<IRecipe>
private static class SortEntry
{
private String name;
private Class cls;
private Class<?> cls;
private Category cat;
List<String> before = Lists.newArrayList();
List<String> after = Lists.newArrayList();
private SortEntry(String name, Class cls, Category cat, String deps)
private SortEntry(String name, Class<?> cls, Category cat, String deps)
{
this.name = name;
this.cls = cls;
@ -105,7 +99,7 @@ public class RecipeSorter implements Comparator<IRecipe>
};
private static Map<Class, Category> categories = Maps.newHashMap();
private static Map<String, Class> types = Maps.newHashMap();
//private static Map<String, Class> types = Maps.newHashMap();
private static Map<String, SortEntry> entries = Maps.newHashMap();
private static Map<Class, Integer> priorities = Maps.newHashMap();
@ -141,6 +135,7 @@ public class RecipeSorter implements Comparator<IRecipe>
}
private static Set<Class> warned = Sets.newHashSet();
@SuppressWarnings("unchecked")
public static void sortCraftManager()
{
bake();
@ -149,7 +144,7 @@ public class RecipeSorter implements Comparator<IRecipe>
Collections.sort(CraftingManager.getInstance().getRecipeList(), INSTANCE);
}
public static void register(String name, Class recipe, Category category, String dependancies)
public static void register(String name, Class<?> recipe, Category category, String dependancies)
{
assert(category != UNKNOWN) : "Category must not be unknown!";
isDirty = true;
@ -159,7 +154,7 @@ public class RecipeSorter implements Comparator<IRecipe>
setCategory(recipe, category);
}
public static void setCategory(Class recipe, Category category)
public static void setCategory(Class<?> recipe, Category category)
{
assert(category != UNKNOWN) : "Category must not be unknown!";
categories.put(recipe, category);
@ -170,9 +165,9 @@ public class RecipeSorter implements Comparator<IRecipe>
return getCategory(recipe.getClass());
}
public static Category getCategory(Class recipe)
public static Category getCategory(Class<?> recipe)
{
Class cls = recipe;
Class<?> cls = recipe;
Category ret = categories.get(cls);
if (ret == null)
@ -194,12 +189,12 @@ public class RecipeSorter implements Comparator<IRecipe>
private static int getPriority(IRecipe recipe)
{
Class cls = recipe.getClass();
Class<?> cls = recipe.getClass();
Integer ret = priorities.get(cls);
if (ret == null)
{
if (!INSTANCE.warned.contains(cls))
if (!warned.contains(cls))
{
FMLLog.fine(" Unknown recipe class! %s Modder please refer to %s", cls.getName(), RecipeSorter.class.getName());
warned.add(cls);

View File

@ -182,6 +182,7 @@ public class ShapedOreRecipe implements IRecipe
return false;
}
@SuppressWarnings("unchecked")
private boolean checkMatch(InventoryCrafting inv, int startX, int startY, boolean mirror)
{
for (int x = 0; x < MAX_CRAFT_GRID_WIDTH; x++)

View File

@ -7,7 +7,6 @@ import java.util.Map.Entry;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.Item;
@ -18,7 +17,7 @@ import net.minecraft.world.World;
public class ShapelessOreRecipe implements IRecipe
{
private ItemStack output = null;
private ArrayList input = new ArrayList();
private ArrayList<Object> input = new ArrayList<Object>();
public ShapelessOreRecipe(Block result, Object... recipe){ this(new ItemStack(result), recipe); }
public ShapelessOreRecipe(Item result, Object... recipe){ this(new ItemStack(result), recipe); }
@ -57,6 +56,7 @@ public class ShapelessOreRecipe implements IRecipe
}
}
@SuppressWarnings("unchecked")
ShapelessOreRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements)
{
output = recipe.getRecipeOutput();
@ -85,10 +85,11 @@ public class ShapelessOreRecipe implements IRecipe
@Override
public ItemStack getCraftingResult(InventoryCrafting var1){ return output.copy(); }
@SuppressWarnings("unchecked")
@Override
public boolean matches(InventoryCrafting var1, World world)
{
ArrayList required = new ArrayList(input);
ArrayList<Object> required = new ArrayList<Object>(input);
for (int x = 0; x < var1.getSizeInventory(); x++)
{
@ -97,7 +98,7 @@ public class ShapelessOreRecipe implements IRecipe
if (slot != null)
{
boolean inRecipe = false;
Iterator req = required.iterator();
Iterator<Object> req = required.iterator();
while (req.hasNext())
{
@ -145,7 +146,7 @@ public class ShapelessOreRecipe implements IRecipe
* manipulate the values in this array as it will effect the recipe itself.
* @return The recipes input vales.
*/
public ArrayList getInput()
public ArrayList<Object> getInput()
{
return this.input;
}

View File

@ -18,11 +18,13 @@ public class ForgeTimeTracker {
public static long tileEntityTrackingTime;
private Map<TileEntity,int[]> tileEntityTimings;
@SuppressWarnings("unused")
private Map<Entity,int[]> entityTimings;
private static final ForgeTimeTracker INSTANCE = new ForgeTimeTracker();
private WeakReference<TileEntity> tile;
@SuppressWarnings("unused")
private WeakReference<Entity> entity;
private long timing;

View File

@ -1,21 +1,12 @@
package net.minecraftforge.server.command;
import java.text.DecimalFormat;
import java.util.List;
import com.google.common.collect.Multiset;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.server.ForgeTimeTracker;
public class ForgeCommand extends CommandBase {

View File

@ -7,13 +7,13 @@ import java.net.URL;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.ShortBuffer;
import javax.sound.sampled.AudioFormat;
import paulscode.sound.ICodec;
import paulscode.sound.SoundBuffer;
import paulscode.sound.SoundSystemConfig;
import paulscode.sound.SoundSystemLogger;
import ibxm.FastTracker2;
import ibxm.IBXM;
import ibxm.Module;
@ -170,6 +170,7 @@ public class CodecIBXM implements ICodec
* will call the reverseByteOrder() method.
* @param b True if the calling audio library requires byte-reversal.
*/
@Override
public void reverseByteOrder( boolean b )
{
reverseBytes = b;
@ -181,6 +182,7 @@ public class CodecIBXM implements ICodec
* @param url URL to an audio file to stream from.
* @return False if an error occurred or if end of stream was reached.
*/
@Override
public boolean initialize( URL url )
{
initialized( SET, false );
@ -265,6 +267,7 @@ public class CodecIBXM implements ICodec
* Returns false if the stream is busy initializing.
* @return True if steam is initialized.
*/
@Override
public boolean initialized()
{
return initialized( GET, XXX );
@ -276,6 +279,7 @@ public class CodecIBXM implements ICodec
* information about accessing and changing default settings.
* @return The audio data wrapped into a SoundBuffer context.
*/
@Override
public SoundBuffer read()
{
if( endOfStream( GET, XXX ) )
@ -333,6 +337,7 @@ public class CodecIBXM implements ICodec
* information about accessing and changing default settings.
* @return the audio data wrapped into a SoundBuffer context.
*/
@Override
public SoundBuffer readAll()
{
if( module == null )
@ -393,6 +398,7 @@ public class CodecIBXM implements ICodec
* Returns false if there is still more data available to be read in.
* @return True if end of stream was reached.
*/
@Override
public boolean endOfStream()
{
return endOfStream( GET, XXX );
@ -401,6 +407,7 @@ public class CodecIBXM implements ICodec
/**
* Closes the audio stream and remove references to all instantiated objects.
*/
@Override
public void cleanup()
{
// if( ibxm != null )
@ -413,6 +420,7 @@ public class CodecIBXM implements ICodec
* readAll() methods.
* @return Information wrapped into an AudioFormat context.
*/
@Override
public AudioFormat getAudioFormat()
{
return myAudioFormat;
@ -493,6 +501,7 @@ public class CodecIBXM implements ICodec
* @param maxLength Maximum size this array may be.
* @return New array.
*/
@SuppressWarnings("unused")
private static byte[] trimArray( byte[] array, int maxLength )
{
byte[] trimmedArray = null;
@ -537,6 +546,7 @@ public class CodecIBXM implements ICodec
* @param two_bytes_data For stereo sounds.
* @return byte array containing the converted data.
*/
@SuppressWarnings("unused")
private static byte[] convertAudioBytes( byte[] audio_bytes,
boolean two_bytes_data )
{