First update pass (1/3) - ~1400 -> 82 errors

This is first update pass, which is mainly import reorganization, name
fixes, etc... Although some parts of second were done where changes
aren't important.
Errors: ~1400 -> 82.
This commit is contained in:
elix-x
2016-06-19 14:43:27 +02:00
parent d9725a7d9b
commit 5498eb6d7c
288 changed files with 1637 additions and 1420 deletions
@@ -25,7 +25,7 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import appeng.api.AEApi;
@@ -67,7 +67,7 @@ public final class ChargedQuartzOreBlock extends QuartzOreBlock
}
@Override
public void randomDisplayTick( final World w, final BlockPos pos, final IBlockState state, final Random r )
public void randomDisplayTick( final IBlockState state, final World w, final BlockPos pos, final Random r )
{
if( !AEConfig.instance.enableEffects )
{
@@ -31,7 +31,7 @@ public final class ChiseledQuartzBlock extends AEDecorativeBlock
{
public ChiseledQuartzBlock()
{
super( Material.rock );
super( Material.ROCK );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
@@ -31,7 +31,7 @@ public final class FluixBlock extends AEDecorativeBlock
{
public FluixBlock()
{
super( Material.rock );
super( Material.ROCK );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
@@ -31,7 +31,7 @@ public final class QuartzBlock extends AEDecorativeBlock
{
public QuartzBlock()
{
super( Material.rock );
super( Material.ROCK );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
@@ -22,9 +22,10 @@ package appeng.decorative.solid;
import java.util.EnumSet;
import net.minecraft.block.material.Material;
import net.minecraft.util.BlockPos;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -40,16 +41,16 @@ public class QuartzGlassBlock extends AEBaseBlock
{
public QuartzGlassBlock()
{
super( Material.glass );
super( Material.GLASS );
this.setLightOpacity( 0 );
this.setOpaque( false );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
@Override
public EnumWorldBlockLayer getBlockLayer()
public BlockRenderLayer getBlockLayer()
{
return EnumWorldBlockLayer.CUTOUT;
return BlockRenderLayer.CUTOUT;
}
@Override
@@ -60,16 +61,16 @@ public class QuartzGlassBlock extends AEBaseBlock
}
@Override
public boolean shouldSideBeRendered( final IBlockAccess w, final BlockPos pos, final EnumFacing side )
public boolean shouldSideBeRendered( final IBlockState state, final IBlockAccess w, final BlockPos pos, final EnumFacing side )
{
final Material mat = w.getBlockState( pos ).getBlock().getMaterial();
if( mat == Material.glass || mat == AEGlassMaterial.INSTANCE )
final Material mat = w.getBlockState( pos ).getBlock().getMaterial(state);
if( mat == Material.GLASS || mat == AEGlassMaterial.INSTANCE )
{
if( w.getBlockState( pos ).getBlock().getRenderType() == this.getRenderType() )
if( w.getBlockState( pos ).getBlock().getRenderType(state) == this.getRenderType(state) )
{
return false;
}
}
return super.shouldSideBeRendered( w, pos, side );
return super.shouldSideBeRendered( state, w, pos, side );
}
}
@@ -24,7 +24,7 @@ import java.util.Random;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import appeng.client.render.effects.VibrantFX;
@@ -44,7 +44,7 @@ public class QuartzLampBlock extends QuartzGlassBlock
}
@Override
public void randomDisplayTick( final World w, final BlockPos pos, final IBlockState state, final Random r )
public void randomDisplayTick( final IBlockState state, final World w, final BlockPos pos, final Random r )
{
if( !AEConfig.instance.enableEffects )
{
@@ -26,9 +26,9 @@ import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
@@ -49,7 +49,7 @@ public class QuartzOreBlock extends AEBaseBlock
public QuartzOreBlock()
{
super( Material.rock );
super( Material.ROCK );
this.setHardness( 3.0F );
this.setResistance( 5.0F );
this.boostBrightnessLow = 0;
@@ -59,9 +59,9 @@ public class QuartzOreBlock extends AEBaseBlock
}
@Override
public EnumWorldBlockLayer getBlockLayer()
public BlockRenderLayer getBlockLayer()
{
return EnumWorldBlockLayer.CUTOUT;
return BlockRenderLayer.CUTOUT;
}
@Override
@@ -77,9 +77,9 @@ public class QuartzOreBlock extends AEBaseBlock
}
@Override
public int getMixedBrightnessForBlock( final IBlockAccess worldIn, final BlockPos pos )
public int getLightValue( final IBlockState state, final IBlockAccess worldIn, final BlockPos pos )
{
int j1 = super.getMixedBrightnessForBlock( worldIn, pos );
int j1 = super.getLightValue( state, worldIn, pos );
if( this.enhanceBrightness )
{
j1 = Math.max( j1 >> 20, j1 >> 4 );
@@ -24,7 +24,7 @@ import java.util.EnumSet;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import appeng.api.util.IOrientable;
@@ -40,7 +40,7 @@ public class QuartzPillarBlock extends AEBaseBlock implements IOrientableBlock
public QuartzPillarBlock()
{
super( Material.rock );
super( Material.ROCK );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
@@ -25,8 +25,9 @@ import com.google.common.base.Optional;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerEvent;
@@ -41,13 +42,13 @@ import appeng.util.Platform;
public class SkyStoneBlock extends AEBaseBlock
{
private static final float BLOCK_RESISTANCE = 150.0f;
private static final double BREAK_SPEAK_SCALAR = 0.1;
private static final float BREAK_SPEAK_SCALAR = 0.1f;
private static final double BREAK_SPEAK_THRESHOLD = 7.0;
private final SkystoneType type;
public SkyStoneBlock( final SkystoneType type )
{
super( Material.rock, Optional.of( type.name() ) );
super( Material.ROCK, Optional.of( type.name() ) );
this.setHardness( 50 );
this.setHasSubtypes( true );
this.blockResistance = BLOCK_RESISTANCE;
@@ -65,9 +66,9 @@ public class SkyStoneBlock extends AEBaseBlock
@SubscribeEvent
public void breakFaster( final PlayerEvent.BreakSpeed event )
{
if( event.state.getBlock() == this && event.entityPlayer != null )
if( event.getState().getBlock() == this && event.getEntityPlayer() != null )
{
final ItemStack is = event.entityPlayer.inventory.getCurrentItem();
final ItemStack is = event.getEntityPlayer().getItemStackFromSlot( EntityEquipmentSlot.MAINHAND );
int level = -1;
if( is != null && is.getItem() != null )
@@ -75,9 +76,9 @@ public class SkyStoneBlock extends AEBaseBlock
level = is.getItem().getHarvestLevel( is, "pickaxe" );
}
if( this.type != SkystoneType.STONE || level >= 3 || event.originalSpeed > BREAK_SPEAK_THRESHOLD )
if( this.type != SkystoneType.STONE || level >= 3 || event.getOriginalSpeed() > BREAK_SPEAK_THRESHOLD )
{
event.newSpeed /= BREAK_SPEAK_SCALAR;
event.setNewSpeed( event.getNewSpeed() / BREAK_SPEAK_SCALAR );
}
}
}