Cleanup: removed IEEP, removed redundant casts, fixed imports, fixed typos.

This commit is contained in:
RainWarrior committed 2016-03-24 22:22:20 +03:00
1 parent 7e4d7077a5
commit a9d23f5e78
133 files changed
+489 -623

No files matched your search

@@ -34,7 +34,6 @@ import com.google.common.collect.Maps;
* It is highly recommended that you extend this class or one of the Forge-provided child classes.
*
*/
@SuppressWarnings("unchecked")
public abstract class BlockFluidBase extends Block implements IFluidBlock
{
protected final static Map<Block, Boolean> defaultDisplacements = Maps.newHashMap();
@@ -88,19 +87,18 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
public static final PropertyInteger LEVEL = PropertyInteger.create("level", 0, 15);
public static final PropertyFloat[] LEVEL_CORNERS = new PropertyFloat[4];
public static final PropertyFloat FLOW_DIRECTION = new PropertyFloat("flow_direction");
public static final IUnlistedProperty<Float>[] FLUID_RENDER_PROPS;
public static final ImmutableList<IUnlistedProperty<Float>> FLUID_RENDER_PROPS;
static
{
@SuppressWarnings("rawtypes")
ImmutableList.Builder<IUnlistedProperty> builder = ImmutableList.builder();
ImmutableList.Builder<IUnlistedProperty<Float>> builder = ImmutableList.builder();
builder.add(FLOW_DIRECTION);
for(int i = 0; i < 4; i++)
{
LEVEL_CORNERS[i] = new PropertyFloat("level_corner_" + i);
builder.add(LEVEL_CORNERS[i]);
}
FLUID_RENDER_PROPS = builder.build().toArray(new IUnlistedProperty[0]);
FLUID_RENDER_PROPS = builder.build();
}
protected int quantaPerBlock = 8;
@@ -144,7 +142,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
@Override
protected BlockStateContainer createBlockState()
{
return new ExtendedBlockState(this, new IProperty[] { LEVEL }, FLUID_RENDER_PROPS);
return new ExtendedBlockState(this, new IProperty[] { LEVEL }, FLUID_RENDER_PROPS.toArray(new IUnlistedProperty<?>[0]));
}
@Override