Compiler warnings pass, undeprecated SplashProgress related stuff.

This commit is contained in:
LexManos committed 2015-11-26 19:38:21 -08:00
1 parent e2818a2803
commit 5549b06f96
108 files changed
+261 -400

No files matched your search

@@ -113,7 +113,6 @@ public class ClientCommandHandler extends CommandHandler
Minecraft mc = FMLClientHandler.instance().getClient();
if (mc.currentScreen instanceof GuiChat)
{
@SuppressWarnings("unchecked")
List<String> commands = getTabCompletionOptions(mc.thePlayer, leftOfCursor, mc.thePlayer.getPosition());
if (commands != null && !commands.isEmpty())
{
@@ -2,8 +2,7 @@ package net.minecraftforge.client;
import net.minecraft.util.Util.EnumOS;
import net.minecraft.world.WorldSettings.GameType;
import net.minecraft.client.settings.GameSettings.Options;
import net.minecraft.item.EnumRarity;
import net.minecraft.client.settings.GameSettings.Options;
import net.minecraftforge.common.util.EnumHelper;
public class EnumHelperClient extends EnumHelper
@@ -16,19 +16,16 @@ import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.IAttributeInstance;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.scoreboard.Score;
import net.minecraft.scoreboard.ScoreObjective;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Scoreboard;
@@ -37,24 +34,17 @@ import net.minecraft.util.FoodStats;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StringUtils;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.common.MinecraftForge;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import com.google.common.base.Strings;
import net.minecraftforge.fml.common.FMLCommonHandler;
public class GuiIngameForge extends GuiIngame
{
//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 WIDGITS = new ResourceLocation("textures/gui/widgets.png");
//private static final ResourceLocation PUMPKIN_BLUR = new ResourceLocation("textures/misc/pumpkinblur.png");
private static final int WHITE = 0xFFFFFF;
@@ -82,7 +72,7 @@ public class GuiIngameForge extends GuiIngame
private ScaledResolution res = null;
private FontRenderer fontrenderer = null;
private RenderGameOverlayEvent eventParent;
private static final String MC_VERSION = MinecraftForge.MC_VERSION;
//private static final String MC_VERSION = MinecraftForge.MC_VERSION;
private GuiOverlayDebugForge debugOverlay;
public GuiIngameForge(Minecraft mc)
@@ -1,9 +1,7 @@
package net.minecraftforge.client;
import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import com.google.common.collect.Maps;
@@ -40,12 +38,12 @@ public class ItemModelMesherForge extends ItemModelMesher
TIntObjectHashMap<IBakedModel> mods = models.get(item);
if (locs == null)
{
locs = new TIntObjectHashMap();
locs = new TIntObjectHashMap<ModelResourceLocation>();
locations.put(item, locs);
}
if (mods == null)
{
mods = new TIntObjectHashMap();
mods = new TIntObjectHashMap<IBakedModel>();
models.put(item, mods);
}
locs.put(meta, location);
@@ -64,7 +62,7 @@ public class ItemModelMesherForge extends ItemModelMesher
}
else
{
mods = new TIntObjectHashMap();
mods = new TIntObjectHashMap<IBakedModel>();
models.put(e.getKey(), mods);
}
final TIntObjectHashMap<IBakedModel> map = mods;
@@ -6,42 +6,10 @@
package net.minecraftforge.client;
import java.util.BitSet;
import java.util.IdentityHashMap;
import com.google.common.collect.Maps;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
public class MinecraftForgeClient
{
private static IdentityHashMap<Item, IItemRenderer> customItemRenderers = Maps.newIdentityHashMap();
/**
* Register a custom renderer for a specific item. This can be used to
* render the item in-world as an EntityItem, when the item is equipped, or
* when the item is in an inventory slot.
* @param itemID The item ID (shifted index) to handle rendering.
* @param renderer The IItemRenderer interface that handles rendering for
* this item.
*/
public static void registerItemRenderer(Item item, IItemRenderer renderer)
{
customItemRenderers.put(item, renderer);
}
public static IItemRenderer getItemRenderer(ItemStack item, ItemRenderType type)
{
IItemRenderer renderer = customItemRenderers.get(item.getItem());
if (renderer != null && renderer.handleRenderType(item, type))
{
return renderer;
}
return null;
}
public static int getRenderPass()
{
return ForgeHooksClient.renderPass;
@@ -3,10 +3,8 @@ package net.minecraftforge.client.event;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.Event.Result;
/**
* Event that hooks into EntityRenderer, allowing any feature to customize visual attributes of
@@ -33,9 +33,9 @@ public class GuiScreenEvent extends Event
/**
* The {@code buttonList} field from the GuiScreen object referenced by {@code gui}.
*/
public List buttonList;
public List<GuiButton> buttonList;
public InitGuiEvent(GuiScreen gui, List buttonList)
public InitGuiEvent(GuiScreen gui, List<GuiButton> buttonList)
{
super(gui);
this.buttonList = buttonList;
@@ -49,13 +49,11 @@ public class GuiScreenEvent extends Event
* If canceled the following lines are skipped in {@code GuiScreen.setWorldAndResolution()}:<br/>
* {@code this.buttonList.clear();}<br/>
* {@code this.initGui();}<br/>
*
* @author bspkrs
*/
@Cancelable
public static class Pre extends InitGuiEvent
{
public Pre(GuiScreen gui, List buttonList)
public Pre(GuiScreen gui, List<GuiButton> buttonList)
{
super(gui, buttonList);
}
@@ -64,12 +62,10 @@ public class GuiScreenEvent extends Event
/**
* This event fires right after {@code GuiScreen.initGui()}.
* This is a good place to alter a GuiScreen's component layout if desired.
*
* @author bspkrs
*/
public static class Post extends InitGuiEvent
{
public Post(GuiScreen gui, List buttonList)
public Post(GuiScreen gui, List<GuiButton> buttonList)
{
super(gui, buttonList);
}
@@ -102,8 +98,6 @@ public class GuiScreenEvent extends Event
/**
* This event fires just before {@code GuiScreen.drawScreen()} is called.
* Cancel this event to skip {@code GuiScreen.drawScreen()}.
*
* @author bspkrs
*/
@Cancelable
public static class Pre extends DrawScreenEvent
@@ -116,8 +110,6 @@ public class GuiScreenEvent extends Event
/**
* This event fires just after {@code GuiScreen.drawScreen()} is called.
*
* @author bspkrs
*/
public static class Post extends DrawScreenEvent
{
@@ -137,26 +129,24 @@ public class GuiScreenEvent extends Event
/**
* A COPY of the {@code buttonList} field from the GuiScreen referenced by {@code gui}.
*/
public List buttonList;
public List<GuiButton> buttonList;
public ActionPerformedEvent(GuiScreen gui, GuiButton button, List buttonList)
public ActionPerformedEvent(GuiScreen gui, GuiButton button, List<GuiButton> buttonList)
{
super(gui);
this.button = button;
this.buttonList = new ArrayList(buttonList);
this.buttonList = new ArrayList<GuiButton>(buttonList);
}
/**
* This event fires once it has been determined that a GuiButton object has been clicked.
* Cancel this event to bypass {@code GuiScreen.actionPerformed()}.
* Replace button with a different button from buttonList to have that button's action executed.
*
* @author bspkrs
*/
@Cancelable
public static class Pre extends ActionPerformedEvent
{
public Pre(GuiScreen gui, GuiButton button, List buttonList)
public Pre(GuiScreen gui, GuiButton button, List<GuiButton> buttonList)
{
super(gui, button, buttonList);
}
@@ -165,12 +155,10 @@ public class GuiScreenEvent extends Event
/**
* This event fires after {@code GuiScreen.actionPerformed()} provided that the active
* screen has not been changed as a result of {@code GuiScreen.actionPerformed()}.
*
* @author bspkrs
*/
public static class Post extends ActionPerformedEvent
{
public Post(GuiScreen gui, GuiButton button, List buttonList)
public Post(GuiScreen gui, GuiButton button, List<GuiButton> buttonList)
{
super(gui, button, buttonList);
}
@@ -1,7 +1,9 @@
package net.minecraftforge.client.event;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.ModelManager;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.util.IRegistry;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.eventhandler.Event;
@@ -13,18 +15,18 @@ import net.minecraftforge.fml.common.eventhandler.Event;
public class ModelBakeEvent extends Event
{
public final ModelManager modelManager;
public final IRegistry modelRegistry;
public final IRegistry<ModelResourceLocation, IBakedModel> modelRegistry;
@Deprecated
public final ModelBakery modelBakery;
public final ModelLoader modelLoader;
@Deprecated
public ModelBakeEvent(ModelManager modelManager, IRegistry modelRegistry, ModelBakery modelBakery)
public ModelBakeEvent(ModelManager modelManager, IRegistry<ModelResourceLocation, IBakedModel> modelRegistry, ModelBakery modelBakery)
{
this(modelManager, modelRegistry, (ModelLoader)modelBakery);
}
public ModelBakeEvent(ModelManager modelManager, IRegistry modelRegistry, ModelLoader modelLoader)
public ModelBakeEvent(ModelManager modelManager, IRegistry<ModelResourceLocation, IBakedModel> modelRegistry, ModelLoader modelLoader)
{
this.modelManager = modelManager;
this.modelRegistry = modelRegistry;
@@ -3,7 +3,6 @@ package net.minecraftforge.client.event;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
@@ -5,15 +5,15 @@ import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraft.client.renderer.entity.RendererLivingEntity;
import net.minecraft.entity.EntityLivingBase;
public abstract class RenderLivingEvent extends Event
public abstract class RenderLivingEvent<T extends EntityLivingBase> extends Event
{
public final EntityLivingBase entity;
public final RendererLivingEntity renderer;
public final RendererLivingEntity<T> renderer;
public final double x;
public final double y;
public final double z;
public RenderLivingEvent(EntityLivingBase entity, RendererLivingEntity renderer, double x, double y, double z)
public RenderLivingEvent(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z)
{
this.entity = entity;
this.renderer = renderer;
@@ -23,27 +23,27 @@ public abstract class RenderLivingEvent extends Event
}
@Cancelable
public static class Pre extends RenderLivingEvent
public static class Pre<T extends EntityLivingBase> extends RenderLivingEvent<T>
{
public Pre(EntityLivingBase entity, RendererLivingEntity renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
public Pre(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
}
public static class Post extends RenderLivingEvent
public static class Post<T extends EntityLivingBase> extends RenderLivingEvent<T>
{
public Post(EntityLivingBase entity, RendererLivingEntity renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
public Post(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
}
public abstract static class Specials extends RenderLivingEvent
public abstract static class Specials<T extends EntityLivingBase> extends RenderLivingEvent<T>
{
public Specials(EntityLivingBase entity, RendererLivingEntity renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
public Specials(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
@Cancelable
public static class Pre extends Specials
public static class Pre<T extends EntityLivingBase> extends Specials<T>
{
public Pre(EntityLivingBase entity, RendererLivingEntity renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
public Pre(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
}
public static class Post extends Specials
public static class Post<T extends EntityLivingBase> extends Specials<T>
{
public Post(EntityLivingBase entity, RendererLivingEntity renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
public Post(EntityLivingBase entity, RendererLivingEntity<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
}
}
}
@@ -3,7 +3,6 @@ package net.minecraftforge.client.event.sound;
import net.minecraft.client.audio.ISound;
import net.minecraft.client.audio.SoundCategory;
import net.minecraft.client.audio.SoundManager;
import net.minecraft.client.audio.SoundPoolEntry;
/***
* Raised when the SoundManager tries to play a normal sound.
@@ -23,7 +23,6 @@ import com.google.common.collect.Lists;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@SuppressWarnings("deprecation")
public class BlockStateLoader
{
private static final Gson GSON = (new GsonBuilder())
@@ -37,6 +37,7 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
@SuppressWarnings("deprecation")
public class ForgeBlockStateV1 extends Marker
{
ForgeBlockStateV1.Variant defaults;
@@ -12,6 +12,7 @@ import net.minecraft.util.EnumFacing;
/*
* Version of IBakedModel with less restriction on camera transformations and with explicit format of the baked array.
*/
@SuppressWarnings("deprecation")
public interface IFlexibleBakedModel extends IBakedModel
{
/*
@@ -20,6 +20,7 @@ import com.google.common.collect.ImmutableMap;
* Model that changes based on the rendering perspective
* (first-person, GUI, e.t.c - see TransformType)
*/
@SuppressWarnings("deprecation")
public interface IPerspectiveAwareModel extends IBakedModel
{
/*
@@ -12,6 +12,7 @@ import com.google.common.collect.Maps;
/**
* IModelState that can change depending on the perspective.
*/
@SuppressWarnings("deprecation")
public interface IPerspectiveState extends IModelState
{
/**
@@ -27,6 +27,7 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
@SuppressWarnings("deprecation")
public class ItemLayerModel implements IRetexturableModel {
public static final ItemLayerModel instance = new ItemLayerModel(ImmutableList.<ResourceLocation>of());
@@ -33,6 +33,7 @@ import com.google.common.collect.Maps;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
@SuppressWarnings("deprecation")
public class ModelFluid implements IModelCustomData
{
public static final ModelFluid waterModel = new ModelFluid(FluidRegistry.WATER);
@@ -63,6 +63,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@SuppressWarnings("deprecation")
public class ModelLoader extends ModelBakery
{
private final Map<ModelResourceLocation, IModel> stateModels = new HashMap<ModelResourceLocation, IModel>();
@@ -498,7 +499,7 @@ public class ModelLoader extends ModelBakery
private final List<IModel> models = new ArrayList<IModel>();
private final IModelState defaultState;
@Deprecated public WeightedRandomModel(Variants variants){ this(null, variants); } // Remove 1.9
@Deprecated @SuppressWarnings("unused") public WeightedRandomModel(Variants variants){ this(null, variants); } // Remove 1.9
public WeightedRandomModel(ModelResourceLocation parent, Variants variants)
{
this.variants = variants.getVariants();
@@ -601,6 +602,7 @@ public class ModelLoader extends ModelBakery
private static class FlexibleWeightedBakedModel extends WeightedBakedModel implements IFlexibleBakedModel
{
@SuppressWarnings("unused")
private final WeightedBakedModel parent;
private final VertexFormat format;
@@ -617,6 +619,7 @@ public class ModelLoader extends ModelBakery
}
}
@SuppressWarnings("unused")
private boolean isBuiltinModel(ModelBlock model)
{
return model == MODEL_GENERATED || model == MODEL_COMPASS || model == MODEL_CLOCK || model == MODEL_ENTITY;
@@ -29,6 +29,7 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@SuppressWarnings("deprecation")
public class MultiModel implements IModel
{
public static class Baked implements IFlexibleBakedModel, IPerspectiveAwareModel
@@ -30,6 +30,7 @@ import com.google.common.base.Objects;
* should be comparable to using Matrix4f directly.
* Immutable.
*/
@SuppressWarnings("deprecation")
public class TRSRTransformation implements IModelState, ITransformation
{
private final Matrix4f matrix;
@@ -312,6 +313,7 @@ public class TRSRTransformation implements IModelState, ITransformation
m.setColumn(i, t);
}
@SuppressWarnings("unused")
private static void sortSingularValues(Matrix3f b, Quat4f v)
{
float p0 = b.m00 * b.m00 + b.m10 * b.m10 + b.m20 * b.m20;
@@ -75,6 +75,7 @@ import com.google.gson.JsonParser;
* To enable for your mod call instance.addDomain(modid).
* If you need more control over accepted resources - extend the class, and register a new instance with ModelLoaderRegistry.
*/
@SuppressWarnings("deprecation")
public class B3DLoader implements ICustomModelLoader
{
public static final B3DLoader instance = new B3DLoader();
@@ -57,12 +57,11 @@ import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@SuppressWarnings("deprecation")
public class OBJModel implements IRetexturableModel, IModelCustomData
{
private Gson GSON = new GsonBuilder().create();
//private Gson GSON = new GsonBuilder().create();
private MaterialLibrary matLib;
private final ResourceLocation modelLocation;
private CustomData customData;
@@ -832,6 +831,11 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
{
return this.materialName;
}
public boolean isTriangles()
{
return isTri;
}
public boolean setVertices(Vertex[] verts)
{