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

@@ -9,13 +9,11 @@ import com.google.common.collect.Maps;
import net.minecraft.block.Block;
import net.minecraft.block.BlockWall;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.statemap.IStateMapper;
import net.minecraft.client.renderer.block.statemap.StateMap;
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.init.Blocks;
@@ -49,11 +47,12 @@ public class ForgeBlockStatesLoaderDebug {
}
});
@SuppressWarnings("unchecked")
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
blockCustom.setUnlocalizedName(MODID + ".customBlock");
GameRegistry.registerBlock(blockCustom, "customBlock");
blockCustom.setUnlocalizedName(MODID + ".customBlock");
GameRegistry.registerBlock(blockCustom, "customBlock");
blockCustomWall.setUnlocalizedName(MODID + ".customWall");
GameRegistry.registerBlock(blockCustomWall, null, nameCustomWall);
@@ -67,13 +66,13 @@ public class ForgeBlockStatesLoaderDebug {
@SideOnly(Side.CLIENT)
public void preInitClient(FMLPreInitializationEvent event)
{
ModelLoader.setCustomStateMapper(blockCustom, new StateMap.Builder().withName(CustomMappedBlock.VARIANT).build());
ModelLoader.setCustomStateMapper(blockCustom, new StateMap.Builder().withName(CustomMappedBlock.VARIANT).build());
ModelLoader.setCustomStateMapper(blockCustomWall, new IStateMapper()
{
StateMap stateMap = new StateMap.Builder().withName(BlockWall.VARIANT).withSuffix("_wall").build();
@Override
public Map putStateModelLocations(Block block)
public Map<IBlockState, ModelResourceLocation> putStateModelLocations(Block block)
{
Map<IBlockState, ModelResourceLocation> map = (Map<IBlockState, ModelResourceLocation>) stateMap.putStateModelLocations(block);
Map<IBlockState, ModelResourceLocation> newMap = Maps.newHashMap();
@@ -94,40 +93,41 @@ public class ForgeBlockStatesLoaderDebug {
}
// this block is never actually used, it's only needed for the error message on load to see the variant it maps to
public static class CustomMappedBlock extends Block {
public static final PropertyEnum VARIANT = PropertyEnum.create("type", CustomVariant.class);
public static class CustomMappedBlock extends Block
{
public static final PropertyEnum<CustomVariant> VARIANT = PropertyEnum.create("type", CustomVariant.class);
protected CustomMappedBlock() {
super(Material.rock);
this.setUnlocalizedName(MODID + ".customMappedBlock");
}
@Override
protected BlockState createBlockState() {
return new BlockState(this, VARIANT);
}
@Override
public int getMetaFromState(IBlockState state)
{
return ((CustomVariant)state.getValue(VARIANT)).ordinal();
}
@Override
public IBlockState getStateFromMeta(int meta)
{
if(meta > CustomVariant.values().length || meta < 0)
meta = 0;
return this.getDefaultState().withProperty(VARIANT, CustomVariant.values()[meta]);
}
public static enum CustomVariant implements IStringSerializable {
TypeA,
TypeB;
public String getName() { return this.toString(); };
}
protected CustomMappedBlock() {
super(Material.rock);
this.setUnlocalizedName(MODID + ".customMappedBlock");
}
@Override
protected BlockState createBlockState() {
return new BlockState(this, VARIANT);
}
@Override
public int getMetaFromState(IBlockState state)
{
return ((CustomVariant)state.getValue(VARIANT)).ordinal();
}
@Override
public IBlockState getStateFromMeta(int meta)
{
if(meta > CustomVariant.values().length || meta < 0)
meta = 0;
return this.getDefaultState().withProperty(VARIANT, CustomVariant.values()[meta]);
}
public static enum CustomVariant implements IStringSerializable {
TypeA,
TypeB;
public String getName() { return this.toString(); };
}
}
}
@@ -54,6 +54,7 @@ public class ItemTileDebug
{
private static ModelResourceLocation itemLocation = new ModelResourceLocation(blockName, "inventory");
@SuppressWarnings("deprecation")
@Override
public void preInit(FMLPreInitializationEvent event)
{
@@ -83,14 +84,14 @@ public class ItemTileDebug
}
}
public static class TestTESR extends TileEntitySpecialRenderer
public static class TestTESR extends TileEntitySpecialRenderer<CustomTileEntity>
{
private static final TestTESR instance = new TestTESR();
private TestTESR() {}
@Override
public void renderTileEntityAt(TileEntity p_180535_1_, double x, double y, double z, float p_180535_8_, int p_180535_9_)
public void renderTileEntityAt(CustomTileEntity p_180535_1_, double x, double y, double z, float p_180535_8_, int p_180535_9_)
{
glPushMatrix();
glTranslated(x, y, z);
@@ -147,6 +147,7 @@ public class LayerBreakingTest
IFlexibleBakedModel solid;
IFlexibleBakedModel translucent;
@SuppressWarnings("unused")
private class DefState implements IModelState
{
@Override
@@ -157,13 +158,13 @@ public class LayerBreakingTest
};
@Override
public List getFaceQuads(EnumFacing p_177551_1_)
public List<BakedQuad> getFaceQuads(EnumFacing p_177551_1_)
{
return Collections.emptyList();
}
@Override
public List getGeneralQuads()
public List<BakedQuad> getGeneralQuads()
{
return Collections.emptyList();
}
@@ -45,6 +45,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
import com.google.common.primitives.Ints;
@SuppressWarnings("deprecation")
@Mod(modid = ModelBakeEventDebug.MODID, version = ModelBakeEventDebug.VERSION)
public class ModelBakeEventDebug
{
@@ -54,6 +55,7 @@ public class ModelBakeEventDebug
private static String blockName = MODID.toLowerCase() + ":" + CustomModelBlock.name;
@SuppressWarnings("unchecked")
public static final IUnlistedProperty<Integer>[] properties = new IUnlistedProperty[6];
static
@@ -207,7 +209,7 @@ public class ModelBakeEventDebug
public static class CustomModel implements IBakedModel, ISmartBlockModel, ISmartItemModel
{
private final TextureAtlasSprite base, overlay;
private boolean hasStateSet = false;
//private boolean hasStateSet = false;
private final IExtendedBlockState state;
public CustomModel(TextureAtlasSprite base, TextureAtlasSprite overlay)
@@ -1,9 +1,6 @@
package net.minecraftforge.test;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import net.minecraftforge.client.EnumHelperClient;
import net.minecraftforge.common.BiomeDictionary;
@@ -38,7 +35,7 @@ public class EnumHelperTest
}
private void testType(Object[] info)
{
Class<?> cls = (Class)info[0];
Class<?> cls = (Class<?>)info[0];
Class<?>[] parameterTypes = new Class[info.length + 2 - 1];
parameterTypes[0] = String.class;
parameterTypes[1] = int.class;