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:
@@ -21,10 +21,14 @@ package appeng.block.misc;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
@@ -40,14 +44,14 @@ public class BlockCellWorkbench extends AEBaseTileBlock
|
||||
|
||||
public BlockCellWorkbench()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileCellWorkbench.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
||||
@@ -24,14 +24,18 @@ import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -56,7 +60,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
public BlockCharger()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileCharger.class );
|
||||
this.setLightOpacity( 2 );
|
||||
@@ -71,7 +75,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
@@ -92,7 +96,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
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 )
|
||||
{
|
||||
@@ -136,7 +140,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
final double twoPixels = 2.0 / 16.0;
|
||||
final EnumFacing up = tile.getUp();
|
||||
final EnumFacing forward = tile.getForward();
|
||||
final AEAxisAlignedBB bb = AEAxisAlignedBB.fromBounds( twoPixels, twoPixels, twoPixels, 1.0 - twoPixels, 1.0 - twoPixels, 1.0 - twoPixels );
|
||||
final AEAxisAlignedBB bb = new AEAxisAlignedBB( twoPixels, twoPixels, twoPixels, 1.0 - twoPixels, 1.0 - twoPixels, 1.0 - twoPixels );
|
||||
|
||||
if( up.getFrontOffsetX() != 0 )
|
||||
{
|
||||
@@ -180,12 +184,12 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
return Collections.singletonList( bb.getBoundingBox() );
|
||||
}
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{
|
||||
out.add( AxisAlignedBB.fromBounds( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
out.add( new AxisAlignedBB( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,14 @@ package appeng.block.misc;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
@@ -40,14 +44,14 @@ public class BlockCondenser extends AEBaseTileBlock
|
||||
|
||||
public BlockCondenser()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileCondenser.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
|
||||
@@ -21,11 +21,14 @@ package appeng.block.misc;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
@@ -43,7 +46,7 @@ public class BlockInscriber extends AEBaseTileBlock
|
||||
|
||||
public BlockInscriber()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileInscriber.class );
|
||||
this.setLightOpacity( 2 );
|
||||
@@ -58,7 +61,7 @@ public class BlockInscriber extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
||||
@@ -21,10 +21,14 @@ package appeng.block.misc;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
@@ -43,7 +47,7 @@ public class BlockInterface extends AEBaseTileBlock
|
||||
|
||||
public BlockInterface()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileInterface.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
@@ -56,7 +60,7 @@ public class BlockInterface extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
||||
@@ -30,9 +30,9 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
|
||||
public BlockLightDetector()
|
||||
{
|
||||
super( Material.circuits );
|
||||
super( Material.CIRCUITS );
|
||||
|
||||
this.setLightOpacity( 0 );
|
||||
this.setFullSize( false );
|
||||
@@ -80,7 +80,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWeakPower( final IBlockAccess w, final BlockPos pos, final IBlockState state, final EnumFacing side )
|
||||
public int getWeakPower( final IBlockState state, final IBlockAccess w, final BlockPos pos, final EnumFacing side )
|
||||
{
|
||||
if( w instanceof World && ( (TileLightDetector) this.getTileEntity( w, pos ) ).isReady() )
|
||||
{
|
||||
@@ -103,7 +103,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick( final World worldIn, final BlockPos pos, final IBlockState state, final Random rand )
|
||||
public void randomDisplayTick( final IBlockState state, final World worldIn, final BlockPos pos, final Random rand )
|
||||
{
|
||||
// cancel out lightning
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
final double xOff = -0.3 * up.getFrontOffsetX();
|
||||
final double yOff = -0.3 * up.getFrontOffsetY();
|
||||
final double zOff = -0.3 * up.getFrontOffsetZ();
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -145,20 +145,21 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
* + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( IBlockState state, World w, BlockPos pos, Block blockIn )
|
||||
{
|
||||
final EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
|
||||
if( !this.canPlaceAt( (World) w, pos, up.getOpposite() ) )
|
||||
{
|
||||
this.dropTorch( w, pos );
|
||||
this.dropTorch( (World) w, pos );
|
||||
}
|
||||
}
|
||||
|
||||
private void dropTorch( final World w, final BlockPos pos )
|
||||
{
|
||||
w.destroyBlock( pos, true );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
w.markBlockForUpdate( pos );
|
||||
}
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -51,7 +51,7 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
|
||||
public BlockPaint()
|
||||
{
|
||||
super( new MaterialLiquid( MapColor.airColor ) );
|
||||
super( new MaterialLiquid( MapColor.AIR ) );
|
||||
|
||||
this.setTileEntity( TilePaint.class );
|
||||
this.setLightOpacity( 0 );
|
||||
@@ -61,9 +61,9 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,7 +80,7 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox( final World worldIn, final BlockPos pos, final IBlockState state )
|
||||
public AxisAlignedBB getCollisionBoundingBox( final IBlockState state, final World worldIn, final BlockPos pos )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -92,13 +92,13 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TilePaint tp = this.getTileEntity( w, pos );
|
||||
|
||||
if( tp != null )
|
||||
{
|
||||
tp.onNeighborBlockChange();
|
||||
tp.neighborChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue( final IBlockAccess w, final BlockPos pos )
|
||||
public int getLightValue( final IBlockState state, final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
final TilePaint tp = this.getTileEntity( w, pos );
|
||||
|
||||
@@ -137,13 +137,13 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAir( final IBlockAccess world, final BlockPos pos )
|
||||
public boolean isAir( final IBlockState state, final IBlockAccess world, final BlockPos pos )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReplaceable( final World worldIn, final BlockPos pos )
|
||||
public boolean isReplaceable( final IBlockAccess worldIn, final BlockPos pos )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,12 @@ package appeng.block.misc;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
@@ -45,8 +45,8 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
|
||||
{
|
||||
public BlockQuartzGrowthAccelerator()
|
||||
{
|
||||
super( Material.rock );
|
||||
this.setStepSound( Block.soundTypeMetal );
|
||||
super( Material.ROCK );
|
||||
this.setSoundType( SoundType.METAL );
|
||||
this.setTileEntity( TileQuartzGrowthAccelerator.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@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 )
|
||||
{
|
||||
@@ -120,7 +120,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
|
||||
break;
|
||||
}
|
||||
|
||||
if( !w.getBlockState( pt ).getBlock().isAir( w, pt ) )
|
||||
if( !w.getBlockState( pt ).getBlock().isAir( w.getBlockState( pt ), w, pt ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -56,7 +56,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
{
|
||||
public BlockQuartzTorch()
|
||||
{
|
||||
super( Material.circuits );
|
||||
super( Material.CIRCUITS );
|
||||
|
||||
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
|
||||
this.setLightLevel( 0.9375F );
|
||||
@@ -108,7 +108,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
final double xOff = -0.3 * up.getFrontOffsetX();
|
||||
final double yOff = -0.3 * up.getFrontOffsetY();
|
||||
final double zOff = -0.3 * up.getFrontOffsetZ();
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -122,7 +122,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
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 )
|
||||
{
|
||||
@@ -150,7 +150,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos,final Block neighborBlock )
|
||||
{
|
||||
final EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
|
||||
@@ -162,6 +162,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
private void dropTorch( final World w, final BlockPos pos )
|
||||
{
|
||||
w.destroyBlock( pos, true );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
w.markBlockForUpdate( pos );
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,15 @@ package appeng.block.misc;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
@@ -43,16 +47,16 @@ public class BlockSecurity extends AEBaseTileBlock
|
||||
|
||||
public BlockSecurity()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
|
||||
this.setTileEntity( TileSecurity.class );
|
||||
this.setFeature( EnumSet.of( AEFeature.Security ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumWorldBlockLayer getBlockLayer()
|
||||
public BlockRenderLayer getBlockLayer()
|
||||
{
|
||||
return EnumWorldBlockLayer.CUTOUT;
|
||||
return BlockRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,7 +66,7 @@ public class BlockSecurity extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer p, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
|
||||
@@ -27,9 +27,9 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
@@ -45,7 +45,7 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
public BlockSkyCompass()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileSkyCompass.class );
|
||||
this.setOpaque( this.setFullSize( false ) );
|
||||
this.lightOpacity = 0;
|
||||
@@ -75,7 +75,7 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
final TileSkyCompass sc = this.getTileEntity( w, pos );
|
||||
final EnumFacing up = sc.getForward();
|
||||
@@ -88,6 +88,7 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
private void dropTorch( final World w, final BlockPos pos )
|
||||
{
|
||||
w.destroyBlock( pos, true );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
w.markBlockForUpdate( pos );
|
||||
}
|
||||
|
||||
@@ -161,9 +162,9 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
break;
|
||||
}
|
||||
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
}
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( 0.0, 0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,8 +23,11 @@ import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -33,9 +36,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||
@@ -55,11 +60,12 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
|
||||
public BlockTinyTNT()
|
||||
{
|
||||
super( Material.tnt );
|
||||
super( Material.TNT );
|
||||
this.setLightOpacity( 1 );
|
||||
//TODO 1.9.4 - setBlockBounds => ?
|
||||
this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||
this.setFullSize( this.setOpaque( false ) );
|
||||
this.setStepSound( soundTypeGrass );
|
||||
this.setSoundType( SoundType.GROUND );
|
||||
this.setHardness( 0F );
|
||||
this.setFeature( EnumSet.of( AEFeature.TinyTNT ) );
|
||||
|
||||
@@ -76,22 +82,22 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
public void postInit()
|
||||
{
|
||||
super.postInit();
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject( Item.getItemFromBlock( this ), new DispenserBehaviorTinyTNT() );
|
||||
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject( Item.getItemFromBlock( this ), new DispenserBehaviorTinyTNT() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.flint_and_steel )
|
||||
if( heldItem != null && heldItem.getItem() == Items.FLINT_AND_STEEL )
|
||||
{
|
||||
this.startFuse( w, pos, player );
|
||||
w.setBlockToAir( pos );
|
||||
player.getCurrentEquippedItem().damageItem( 1, player );
|
||||
heldItem.damageItem( 1, player );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.onActivated( w, pos, player, side, hitX, hitY, hitZ );
|
||||
return super.onActivated( w, pos, player, hand, heldItem, side, hitX, hitY, hitZ );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,12 +107,13 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
{
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, igniter );
|
||||
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||
//TODO 1.9.4 - playSoundAtEntity => ?
|
||||
w.playSoundAtEntity( primedTinyTNTEntity, "game.tnt.primed", 1.0F, 1.0F );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
public void neighborChanged( final IBlockState state, final World w, final BlockPos pos, final Block neighborBlock )
|
||||
{
|
||||
if( w.isBlockIndirectlyGettingPowered( pos ) > 0 )
|
||||
{
|
||||
@@ -128,7 +135,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock( final World w, final BlockPos pos, final Entity entity )
|
||||
public void onEntityWalk( final World w, final BlockPos pos, final Entity entity )
|
||||
{
|
||||
if( entity instanceof EntityArrow && !w.isRemote )
|
||||
{
|
||||
@@ -154,7 +161,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
if( !w.isRemote )
|
||||
{
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, exp.getExplosivePlacedBy() );
|
||||
primedTinyTNTEntity.fuse = w.rand.nextInt( primedTinyTNTEntity.fuse / 4 ) + primedTinyTNTEntity.fuse / 8;
|
||||
primedTinyTNTEntity.setFuse( w.rand.nextInt( primedTinyTNTEntity.getFuse() / 4 ) + primedTinyTNTEntity.getFuse() / 8 );
|
||||
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||
}
|
||||
}
|
||||
@@ -162,12 +169,12 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final World w, final BlockPos pos, final Entity thePlayer, final boolean b )
|
||||
{
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, final Entity e )
|
||||
{
|
||||
out.add( AxisAlignedBB.fromBounds( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
|
||||
out.add( new AxisAlignedBB( 0.25, 0, 0.25, 0.75, 0.5, 0.75 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,12 +22,16 @@ package appeng.block.misc;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -48,7 +52,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
|
||||
public BlockVibrationChamber()
|
||||
{
|
||||
super( Material.iron );
|
||||
super( Material.IRON );
|
||||
this.setTileEntity( TileVibrationChamber.class );
|
||||
this.setHardness( 4.2F );
|
||||
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
|
||||
@@ -69,7 +73,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
@@ -88,9 +92,9 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user