final variables and parameters
This commit is contained in:
@@ -93,7 +93,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
return isOpaque && isFullSize;
|
||||
}
|
||||
|
||||
protected AEBaseBlock( Material mat )
|
||||
protected AEBaseBlock( final Material mat )
|
||||
{
|
||||
this( mat, Optional.<String>absent() );
|
||||
this.setLightOpacity( 255 );
|
||||
@@ -102,7 +102,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
this.setHarvestLevel( "pickaxe", 0 );
|
||||
}
|
||||
|
||||
protected AEBaseBlock( Material mat, Optional<String> subName )
|
||||
protected AEBaseBlock( final Material mat, final Optional<String> subName )
|
||||
{
|
||||
super( mat );
|
||||
|
||||
@@ -144,9 +144,9 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
@Override
|
||||
final public IBlockState getExtendedState(
|
||||
IBlockState state,
|
||||
IBlockAccess world,
|
||||
BlockPos pos )
|
||||
final IBlockState state,
|
||||
final IBlockAccess world,
|
||||
final BlockPos pos )
|
||||
{
|
||||
return ((IExtendedBlockState)super.getExtendedState( state, world, pos ) ).withProperty( AE_BLOCK_POS, pos ).withProperty( AE_BLOCK_ACCESS, world );
|
||||
}
|
||||
@@ -166,18 +166,18 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
try
|
||||
{
|
||||
Class<? extends BaseBlockRender> re = this.getRenderer();
|
||||
final Class<? extends BaseBlockRender> re = this.getRenderer();
|
||||
if ( re == null ) return null; // use 1.8 models.
|
||||
final BaseBlockRender renderer = re.newInstance();
|
||||
this.renderInfo = new BlockRenderInfo( renderer );
|
||||
|
||||
return this.renderInfo;
|
||||
}
|
||||
catch( InstantiationException e )
|
||||
catch( final InstantiationException e )
|
||||
{
|
||||
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.getRenderer(), e );
|
||||
}
|
||||
catch( IllegalAccessException e )
|
||||
catch( final IllegalAccessException e )
|
||||
{
|
||||
throw new IllegalStateException( "Failed to create a new instance of " + this.getRenderer() + " because of permissions.", e );
|
||||
}
|
||||
@@ -185,9 +185,9 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
@Override
|
||||
public int colorMultiplier(
|
||||
IBlockAccess worldIn,
|
||||
BlockPos pos,
|
||||
int colorTint )
|
||||
final IBlockAccess worldIn,
|
||||
final BlockPos pos,
|
||||
final int colorTint )
|
||||
{
|
||||
return colorTint;
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
return BaseBlockRender.class;
|
||||
}
|
||||
|
||||
protected void setFeature( EnumSet<AEFeature> f )
|
||||
protected void setFeature( final EnumSet<AEFeature> f )
|
||||
{
|
||||
final AEBlockFeatureHandler featureHandler = new AEBlockFeatureHandler( f, this, this.featureSubName );
|
||||
this.setHandler( featureHandler );
|
||||
@@ -210,7 +210,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
return this.handler;
|
||||
}
|
||||
|
||||
protected final void setHandler( IFeatureHandler handler )
|
||||
protected final void setHandler( final IFeatureHandler handler )
|
||||
{
|
||||
this.handler = handler;
|
||||
}
|
||||
@@ -232,7 +232,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
return this.isFullSize && this.isOpaque;
|
||||
}
|
||||
|
||||
protected ICustomCollision getCustomCollision( World w, BlockPos pos )
|
||||
protected ICustomCollision getCustomCollision( final World w, final BlockPos pos )
|
||||
{
|
||||
if( this instanceof ICustomCollision )
|
||||
{
|
||||
@@ -242,10 +242,10 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public IAESprite getIcon( IBlockAccess w, BlockPos pos, EnumFacing side )
|
||||
public IAESprite getIcon( final IBlockAccess w, final BlockPos pos, final EnumFacing side )
|
||||
{
|
||||
IBlockState state =w.getBlockState( pos );
|
||||
IOrientable ori = getOrientable( w, pos );
|
||||
final IBlockState state =w.getBlockState( pos );
|
||||
final IOrientable ori = getOrientable( w, pos );
|
||||
|
||||
if ( ori == null )
|
||||
return getIcon( side,state );
|
||||
@@ -254,29 +254,29 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public IAESprite getIcon( EnumFacing side, IBlockState state )
|
||||
public IAESprite getIcon( final EnumFacing side, final IBlockState state )
|
||||
{
|
||||
return this.getRendererInstance().getTexture( AEPartLocation.fromFacing( side ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxesToList(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
AxisAlignedBB bb,
|
||||
List out,
|
||||
Entity e )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final AxisAlignedBB bb,
|
||||
final List out,
|
||||
final Entity e )
|
||||
{
|
||||
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
|
||||
|
||||
if( collisionHandler != null && bb != null )
|
||||
{
|
||||
List<AxisAlignedBB> tmp = new ArrayList<AxisAlignedBB>();
|
||||
final List<AxisAlignedBB> tmp = new ArrayList<AxisAlignedBB>();
|
||||
collisionHandler.addCollidingBlockToList( w, pos, bb, tmp, e );
|
||||
for( AxisAlignedBB b : tmp )
|
||||
for( final AxisAlignedBB b : tmp )
|
||||
{
|
||||
AxisAlignedBB offset = b.offset( pos.getX(), pos.getY(), pos.getZ() );
|
||||
final AxisAlignedBB offset = b.offset( pos.getX(), pos.getY(), pos.getZ() );
|
||||
if( bb.intersectsWith( offset ) )
|
||||
{
|
||||
out.add( offset );
|
||||
@@ -292,8 +292,8 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public AxisAlignedBB getSelectedBoundingBox(
|
||||
World w,
|
||||
BlockPos pos )
|
||||
final World w,
|
||||
final BlockPos pos )
|
||||
{
|
||||
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
|
||||
|
||||
@@ -309,11 +309,11 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
double lastDist = 0;
|
||||
|
||||
for( AxisAlignedBB bb : bbs )
|
||||
for( final AxisAlignedBB bb : bbs )
|
||||
{
|
||||
this.setBlockBounds( (float) bb.minX, (float) bb.minY, (float) bb.minZ, (float) bb.maxX, (float) bb.maxY, (float) bb.maxZ );
|
||||
|
||||
MovingObjectPosition r = super.collisionRayTrace( w, pos, ld.a, ld.b );
|
||||
final MovingObjectPosition r = super.collisionRayTrace( w, pos, ld.a, ld.b );
|
||||
|
||||
this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
@@ -342,7 +342,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
AxisAlignedBB b = null; // new AxisAlignedBB( 16d, 16d, 16d, 0d, 0d, 0d );
|
||||
|
||||
for( AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, pos, null, false ) )
|
||||
for( final AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, pos, null, false ) )
|
||||
{
|
||||
if ( b == null )
|
||||
{
|
||||
@@ -379,10 +379,10 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
@Override
|
||||
public MovingObjectPosition collisionRayTrace(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
Vec3 a,
|
||||
Vec3 b )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final Vec3 a,
|
||||
final Vec3 b )
|
||||
{
|
||||
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
|
||||
|
||||
@@ -393,21 +393,21 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
double lastDist = 0;
|
||||
|
||||
for( AxisAlignedBB bb : bbs )
|
||||
for( final AxisAlignedBB bb : bbs )
|
||||
{
|
||||
this.setBlockBounds( (float) bb.minX, (float) bb.minY, (float) bb.minZ, (float) bb.maxX, (float) bb.maxY, (float) bb.maxZ );
|
||||
|
||||
MovingObjectPosition r = super.collisionRayTrace( w, pos, a, b );
|
||||
final MovingObjectPosition r = super.collisionRayTrace( w, pos, a, b );
|
||||
|
||||
this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
if( r != null )
|
||||
{
|
||||
double xLen = ( a.xCoord - r.hitVec.xCoord );
|
||||
double yLen = ( a.yCoord - r.hitVec.yCoord );
|
||||
double zLen = ( a.zCoord - r.hitVec.zCoord );
|
||||
final double xLen = ( a.xCoord - r.hitVec.xCoord );
|
||||
final double yLen = ( a.yCoord - r.hitVec.yCoord );
|
||||
final double zLen = ( a.zCoord - r.hitVec.zCoord );
|
||||
|
||||
double thisDist = xLen * xLen + yLen * yLen + zLen * zLen;
|
||||
final double thisDist = xLen * xLen + yLen * yLen + zLen * zLen;
|
||||
if( br == null || lastDist > thisDist )
|
||||
{
|
||||
lastDist = thisDist;
|
||||
@@ -428,7 +428,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
return super.collisionRayTrace( w, pos, a, b );
|
||||
}
|
||||
|
||||
public boolean onActivated( World w, BlockPos pos, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -436,7 +436,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
@SuppressWarnings( "unchecked" )
|
||||
public final void getSubBlocks( Item item, CreativeTabs tabs, List itemStacks )
|
||||
public final void getSubBlocks( final Item item, final CreativeTabs tabs, final List itemStacks )
|
||||
{
|
||||
this.getCheckedSubBlocks( item, tabs, itemStacks );
|
||||
}
|
||||
@@ -449,21 +449,21 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(
|
||||
World worldIn,
|
||||
BlockPos pos )
|
||||
final World worldIn,
|
||||
final BlockPos pos )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNormalCube(
|
||||
IBlockAccess world,
|
||||
BlockPos pos )
|
||||
final IBlockAccess world,
|
||||
final BlockPos pos )
|
||||
{
|
||||
return this.isFullSize;
|
||||
}
|
||||
|
||||
public IOrientable getOrientable( IBlockAccess w, BlockPos pos )
|
||||
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
if( this instanceof IOrientableBlock )
|
||||
{
|
||||
@@ -474,9 +474,9 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
@Override
|
||||
public boolean rotateBlock(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EnumFacing axis )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EnumFacing axis )
|
||||
{
|
||||
final IOrientable rotatable = this.getOrientable( w, pos );
|
||||
|
||||
@@ -514,40 +514,40 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void customRotateBlock( IOrientable rotatable, EnumFacing axis )
|
||||
protected void customRotateBlock( final IOrientable rotatable, final EnumFacing axis )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public boolean isValidOrientation( World w, BlockPos pos, EnumFacing forward, EnumFacing up )
|
||||
public boolean isValidOrientation( final World w, final BlockPos pos, final EnumFacing forward, final EnumFacing up )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing[] getValidRotations( World w, BlockPos pos )
|
||||
public EnumFacing[] getValidRotations( final World w, final BlockPos pos )
|
||||
{
|
||||
return new EnumFacing[0];
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
{
|
||||
super.getSubBlocks( item, tabs, itemStacks );
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void setRenderStateByMeta( int itemDamage )
|
||||
public void setRenderStateByMeta( final int itemDamage )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
public String getUnlocalizedName( final ItemStack is )
|
||||
{
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
public void addInformation( ItemStack is, EntityPlayer player, List<String> lines, boolean advancedItemTooltips )
|
||||
public void addInformation( final ItemStack is, final EntityPlayer player, final List<String> lines, final boolean advancedItemTooltips )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -563,8 +563,8 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
}
|
||||
|
||||
public EnumFacing mapRotation(
|
||||
IOrientable ori,
|
||||
EnumFacing dir )
|
||||
final IOrientable ori,
|
||||
final EnumFacing dir )
|
||||
{
|
||||
// case DOWN: return bottomIcon;
|
||||
// case UP: return blockIcon;
|
||||
@@ -581,12 +581,12 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
return dir;
|
||||
}
|
||||
|
||||
int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY();
|
||||
int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
|
||||
int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
|
||||
final int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY();
|
||||
final int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
|
||||
final int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
|
||||
|
||||
EnumFacing west = null;
|
||||
for( EnumFacing dx : EnumFacing.VALUES )
|
||||
for( final EnumFacing dx : EnumFacing.VALUES )
|
||||
{
|
||||
if( dx.getFrontOffsetX() == west_x && dx.getFrontOffsetY() == west_y && dx.getFrontOffsetZ() == west_z )
|
||||
{
|
||||
@@ -629,8 +629,8 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void registerBlockIcons(
|
||||
TextureMap clientHelper,
|
||||
String name )
|
||||
final TextureMap clientHelper,
|
||||
final String name )
|
||||
{
|
||||
final BlockRenderInfo info = this.getRendererInstance();
|
||||
final FlippableIcon topIcon;
|
||||
@@ -647,7 +647,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
private FlippableIcon optionalIcon( TextureMap ir, String name, IAESprite substitute )
|
||||
private FlippableIcon optionalIcon( final TextureMap ir, final String name, IAESprite substitute )
|
||||
{
|
||||
// if the input is an flippable IAESprite find the original.
|
||||
while( substitute instanceof FlippableIcon )
|
||||
@@ -659,26 +659,26 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
{
|
||||
try
|
||||
{
|
||||
ResourceLocation resLoc = new ResourceLocation( AppEng.MOD_ID, String.format( "%s/%s%s", "textures/blocks", name, ".png" ) );
|
||||
final ResourceLocation resLoc = new ResourceLocation( AppEng.MOD_ID, String.format( "%s/%s%s", "textures/blocks", name, ".png" ) );
|
||||
|
||||
IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
|
||||
final IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
|
||||
if( res != null )
|
||||
{
|
||||
return new FlippableIcon( new BaseIcon( ir.registerSprite( new ResourceLocation(AppEng.MOD_ID, "blocks/" + name ) ) ) );
|
||||
}
|
||||
}
|
||||
catch( Throwable e )
|
||||
catch( final Throwable e )
|
||||
{
|
||||
return new FlippableIcon( substitute );
|
||||
}
|
||||
}
|
||||
|
||||
ResourceLocation resLoc = new ResourceLocation(AppEng.MOD_ID, "blocks/" + name );
|
||||
final ResourceLocation resLoc = new ResourceLocation(AppEng.MOD_ID, "blocks/" + name );
|
||||
return new FlippableIcon(new BaseIcon( ir.registerSprite( resLoc ) ) );
|
||||
}
|
||||
|
||||
String textureName;
|
||||
public void setBlockTextureName( String texture )
|
||||
public void setBlockTextureName( final String texture )
|
||||
{
|
||||
textureName = texture;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class AEBaseItemBlock extends ItemBlock
|
||||
|
||||
private final AEBaseBlock blockType;
|
||||
|
||||
public AEBaseItemBlock( Block id )
|
||||
public AEBaseItemBlock( final Block id )
|
||||
{
|
||||
super( id );
|
||||
this.blockType = (AEBaseBlock) id;
|
||||
@@ -54,7 +54,7 @@ public class AEBaseItemBlock extends ItemBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata( int dmg )
|
||||
public int getMetadata( final int dmg )
|
||||
{
|
||||
if( this.hasSubtypes )
|
||||
{
|
||||
@@ -66,40 +66,40 @@ public class AEBaseItemBlock extends ItemBlock
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
@SuppressWarnings( "unchecked" )
|
||||
public final void addInformation( ItemStack itemStack, EntityPlayer player, List toolTip, boolean advancedTooltips )
|
||||
public final void addInformation( final ItemStack itemStack, final EntityPlayer player, final List toolTip, final boolean advancedTooltips )
|
||||
{
|
||||
this.addCheckedInformation( itemStack, player, toolTip, advancedTooltips );
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void addCheckedInformation( ItemStack itemStack, EntityPlayer player, List<String> toolTip, boolean advancedToolTips )
|
||||
public void addCheckedInformation( final ItemStack itemStack, final EntityPlayer player, final List<String> toolTip, final boolean advancedToolTips )
|
||||
{
|
||||
this.blockType.addInformation( itemStack, player, toolTip, advancedToolTips );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBookEnchantable( ItemStack itemstack1, ItemStack itemstack2 )
|
||||
public boolean isBookEnchantable( final ItemStack itemstack1, final ItemStack itemstack2 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
public String getUnlocalizedName( final ItemStack is )
|
||||
{
|
||||
return this.blockType.getUnlocalizedName( is );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean placeBlockAt(
|
||||
ItemStack stack,
|
||||
EntityPlayer player,
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ,
|
||||
IBlockState newState )
|
||||
final ItemStack stack,
|
||||
final EntityPlayer player,
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ,
|
||||
final IBlockState newState )
|
||||
{
|
||||
EnumFacing up = null;
|
||||
EnumFacing forward = null;
|
||||
@@ -134,7 +134,7 @@ public class AEBaseItemBlock extends ItemBlock
|
||||
{
|
||||
up = EnumFacing.UP;
|
||||
|
||||
byte rotation = (byte) ( MathHelper.floor_double( ( player.rotationYaw * 4F ) / 360F + 2.5D ) & 3 );
|
||||
final byte rotation = (byte) ( MathHelper.floor_double( ( player.rotationYaw * 4F ) / 360F + 2.5D ) & 3 );
|
||||
|
||||
switch( rotation )
|
||||
{
|
||||
@@ -187,7 +187,7 @@ public class AEBaseItemBlock extends ItemBlock
|
||||
{
|
||||
if( this.blockType instanceof AEBaseTileBlock && !( this.blockType instanceof BlockLightDetector ) )
|
||||
{
|
||||
AEBaseTile tile = ( (AEBaseTileBlock) this.blockType ).getTileEntity( w, pos );
|
||||
final AEBaseTile tile = ( (AEBaseTileBlock) this.blockType ).getTileEntity( w, pos );
|
||||
ori = tile;
|
||||
|
||||
if( tile == null )
|
||||
|
||||
@@ -40,18 +40,18 @@ import appeng.util.Platform;
|
||||
public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEItemPowerStorage
|
||||
{
|
||||
|
||||
public AEBaseItemBlockChargeable( Block id )
|
||||
public AEBaseItemBlockChargeable( final Block id )
|
||||
{
|
||||
super( id );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void addCheckedInformation( ItemStack itemStack, EntityPlayer player, List<String> toolTip, boolean advancedTooltips )
|
||||
public void addCheckedInformation( final ItemStack itemStack, final EntityPlayer player, final List<String> toolTip, final boolean advancedTooltips )
|
||||
{
|
||||
final NBTTagCompound tag = itemStack.getTagCompound();
|
||||
double internalCurrentPower = 0;
|
||||
double internalMaxPower = this.getMaxEnergyCapacity();
|
||||
final double internalMaxPower = this.getMaxEnergyCapacity();
|
||||
|
||||
if( tag != null )
|
||||
{
|
||||
@@ -67,7 +67,7 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
|
||||
{
|
||||
final Block blockID = Block.getBlockFromItem( this );
|
||||
final IBlockDefinition energyCell = Api.INSTANCE.definitions().blocks().energyCell();
|
||||
for( Block block : energyCell.maybeBlock().asSet() )
|
||||
for( final Block block : energyCell.maybeBlock().asSet() )
|
||||
{
|
||||
if( blockID == block )
|
||||
{
|
||||
@@ -83,10 +83,10 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
|
||||
}
|
||||
|
||||
@Override
|
||||
public double injectAEPower( ItemStack is, double amt )
|
||||
public double injectAEPower( final ItemStack is, double amt )
|
||||
{
|
||||
double internalCurrentPower = this.getInternal( is );
|
||||
double internalMaxPower = this.getMaxEnergyCapacity();
|
||||
final double internalMaxPower = this.getMaxEnergyCapacity();
|
||||
internalCurrentPower += amt;
|
||||
if( internalCurrentPower > internalMaxPower )
|
||||
{
|
||||
@@ -100,20 +100,20 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
|
||||
return 0;
|
||||
}
|
||||
|
||||
private double getInternal( ItemStack is )
|
||||
private double getInternal( final ItemStack is )
|
||||
{
|
||||
final NBTTagCompound nbt = Platform.openNbtData( is );
|
||||
return nbt.getDouble( "internalCurrentPower" );
|
||||
}
|
||||
|
||||
private void setInternal( ItemStack is, double amt )
|
||||
private void setInternal( final ItemStack is, final double amt )
|
||||
{
|
||||
final NBTTagCompound nbt = Platform.openNbtData( is );
|
||||
nbt.setDouble( "internalCurrentPower", amt );
|
||||
}
|
||||
|
||||
@Override
|
||||
public double extractAEPower( ItemStack is, double amt )
|
||||
public double extractAEPower( final ItemStack is, double amt )
|
||||
{
|
||||
double internalCurrentPower = this.getInternal( is );
|
||||
if( internalCurrentPower > amt )
|
||||
@@ -129,19 +129,19 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getAEMaxPower( ItemStack is )
|
||||
public double getAEMaxPower( final ItemStack is )
|
||||
{
|
||||
return this.getMaxEnergyCapacity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getAECurrentPower( ItemStack is )
|
||||
public double getAECurrentPower( final ItemStack is )
|
||||
{
|
||||
return this.getInternal( is );
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccessRestriction getPowerFlow( ItemStack is )
|
||||
public AccessRestriction getPowerFlow( final ItemStack is )
|
||||
{
|
||||
return AccessRestriction.WRITE;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class AEBaseStairBlock extends BlockStairs implements IAEFeature
|
||||
{
|
||||
private final IFeatureHandler features;
|
||||
|
||||
protected AEBaseStairBlock( Block block, EnumSet<AEFeature> features, String type )
|
||||
protected AEBaseStairBlock( final Block block, final EnumSet<AEFeature> features, final String type )
|
||||
{
|
||||
super( block.getStateFromMeta( 0 ) );
|
||||
|
||||
|
||||
@@ -71,24 +71,24 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
@Nonnull
|
||||
private Class<? extends TileEntity> tileEntityType;
|
||||
|
||||
public AEBaseTileBlock( Material mat )
|
||||
public AEBaseTileBlock( final Material mat )
|
||||
{
|
||||
super( mat );
|
||||
}
|
||||
|
||||
protected AEBaseTileBlock( Material mat, Optional<String> subName )
|
||||
protected AEBaseTileBlock( final Material mat, final Optional<String> subName )
|
||||
{
|
||||
super( mat, subName );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setFeature( EnumSet<AEFeature> f )
|
||||
protected void setFeature( final EnumSet<AEFeature> f )
|
||||
{
|
||||
final AETileBlockFeatureHandler featureHandler = new AETileBlockFeatureHandler( f, this, this.featureSubName );
|
||||
this.setHandler( featureHandler );
|
||||
}
|
||||
|
||||
protected void setTileEntity( Class<? extends TileEntity> c )
|
||||
protected void setTileEntity( final Class<? extends TileEntity> c )
|
||||
{
|
||||
this.tileEntityType = c;
|
||||
this.isInventory = IInventory.class.isAssignableFrom( c );
|
||||
@@ -97,7 +97,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
|
||||
|
||||
// update Block value.
|
||||
private void setTileProvider( boolean b )
|
||||
private void setTileProvider( final boolean b )
|
||||
{
|
||||
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
|
||||
}
|
||||
@@ -113,13 +113,13 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, int x, int y, int z )
|
||||
public <T extends AEBaseTile> T getTileEntity( final IBlockAccess w, final int x, final int y, final int z )
|
||||
{
|
||||
return getTileEntity( w, new BlockPos(x,y,z) );
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, BlockPos pos )
|
||||
public <T extends AEBaseTile> T getTileEntity( final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
if( !this.hasBlockTileEntity() )
|
||||
{
|
||||
@@ -136,7 +136,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
}
|
||||
|
||||
@Override
|
||||
public final TileEntity createNewTileEntity( World var1, int var2 )
|
||||
public final TileEntity createNewTileEntity( final World var1, final int var2 )
|
||||
{
|
||||
if( this.hasBlockTileEntity() )
|
||||
{
|
||||
@@ -144,11 +144,11 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
{
|
||||
return this.tileEntityType.newInstance();
|
||||
}
|
||||
catch( InstantiationException e )
|
||||
catch( final InstantiationException e )
|
||||
{
|
||||
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.tileEntityType, e );
|
||||
}
|
||||
catch( IllegalAccessException e )
|
||||
catch( final IllegalAccessException e )
|
||||
{
|
||||
throw new IllegalStateException( "Failed to create a new instance of " + this.tileEntityType + ", because lack of permissions", e );
|
||||
}
|
||||
@@ -159,9 +159,9 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
|
||||
@Override
|
||||
public void breakBlock(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state )
|
||||
{
|
||||
final AEBaseTile te = this.getTileEntity( w,pos );
|
||||
if( te != null )
|
||||
@@ -185,7 +185,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
}
|
||||
|
||||
@Override
|
||||
public final EnumFacing[] getValidRotations( World w, BlockPos pos )
|
||||
public final EnumFacing[] getValidRotations( final World w, final BlockPos pos )
|
||||
{
|
||||
final AEBaseTile obj = this.getTileEntity( w, pos );
|
||||
if( obj != null && obj.canBeRotated() )
|
||||
@@ -198,10 +198,10 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
|
||||
@Override
|
||||
public boolean recolorBlock(
|
||||
World world,
|
||||
BlockPos pos,
|
||||
EnumFacing side,
|
||||
EnumDyeColor color )
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final EnumFacing side,
|
||||
final EnumDyeColor color )
|
||||
{
|
||||
final TileEntity te = this.getTileEntity( world, pos );
|
||||
|
||||
@@ -224,8 +224,8 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(
|
||||
World w,
|
||||
BlockPos pos )
|
||||
final World w,
|
||||
final BlockPos pos )
|
||||
{
|
||||
final TileEntity te = this.getTileEntity( w, pos );
|
||||
if( te instanceof IInventory )
|
||||
@@ -237,11 +237,11 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
|
||||
@Override
|
||||
public boolean onBlockEventReceived(
|
||||
World worldIn,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
int eventID,
|
||||
int eventParam )
|
||||
final World worldIn,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final int eventID,
|
||||
final int eventParam )
|
||||
{
|
||||
super.onBlockEventReceived( worldIn, pos, state ,eventID, eventParam);
|
||||
final TileEntity tileentity = worldIn.getTileEntity( pos );
|
||||
@@ -250,11 +250,11 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
EntityLivingBase placer,
|
||||
ItemStack is )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EntityLivingBase placer,
|
||||
final ItemStack is )
|
||||
{
|
||||
if( is.hasDisplayName() )
|
||||
{
|
||||
@@ -268,14 +268,14 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
EntityPlayer player,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EntityPlayer player,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( player != null )
|
||||
{
|
||||
@@ -301,7 +301,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
}
|
||||
|
||||
final ItemStack op = new ItemStack( this );
|
||||
for( ItemStack ol : drops )
|
||||
for( final ItemStack ol : drops )
|
||||
{
|
||||
if( Platform.isSameItemType( ol, op ) )
|
||||
{
|
||||
@@ -365,13 +365,13 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOrientable getOrientable( IBlockAccess w, BlockPos pos )
|
||||
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
return this.getTileEntity( w, pos );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICustomCollision getCustomCollision( World w, BlockPos pos )
|
||||
public ICustomCollision getCustomCollision( final World w, final BlockPos pos )
|
||||
{
|
||||
final AEBaseTile te = this.getTileEntity( w, pos );
|
||||
if( te instanceof ICustomCollision )
|
||||
|
||||
@@ -24,7 +24,7 @@ import net.minecraft.block.material.Material;
|
||||
|
||||
public abstract class AEDecorativeBlock extends AEBaseBlock
|
||||
{
|
||||
public AEDecorativeBlock( Material mat )
|
||||
public AEDecorativeBlock( final Material mat )
|
||||
{
|
||||
super( mat );
|
||||
}
|
||||
|
||||
@@ -53,12 +53,12 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
|
||||
|
||||
@Override
|
||||
public IAESprite getIcon(
|
||||
EnumFacing side,
|
||||
IBlockState state )
|
||||
final EnumFacing side,
|
||||
final IBlockState state )
|
||||
{
|
||||
if( side != EnumFacing.SOUTH )
|
||||
{
|
||||
for( Block craftingUnitBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
|
||||
for( final Block craftingUnitBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
|
||||
{
|
||||
return ( (BlockCraftingUnit)craftingUnitBlock ).getIcon( side, state );
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public class BlockCraftingMonitor extends BlockCraftingUnit
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
{
|
||||
itemStacks.add( new ItemStack( this, 1, 0 ) );
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import appeng.tile.crafting.TileCraftingStorageTile;
|
||||
public class BlockCraftingStorage extends BlockCraftingUnit
|
||||
{
|
||||
|
||||
public BlockCraftingStorage( CraftingUnitType type )
|
||||
public BlockCraftingStorage( final CraftingUnitType type )
|
||||
{
|
||||
super(type );
|
||||
this.setTileEntity( TileCraftingStorageTile.class );
|
||||
@@ -46,9 +46,9 @@ public class BlockCraftingStorage extends BlockCraftingUnit
|
||||
}
|
||||
|
||||
@Override
|
||||
public appeng.client.texture.IAESprite getIcon(net.minecraft.util.EnumFacing side, net.minecraft.block.state.IBlockState state)
|
||||
public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final net.minecraft.block.state.IBlockState state)
|
||||
{
|
||||
boolean formed = (boolean)state.getValue( FORMED );
|
||||
final boolean formed = (boolean)state.getValue( FORMED );
|
||||
switch( this.type )
|
||||
{
|
||||
default:
|
||||
@@ -74,7 +74,7 @@ public class BlockCraftingStorage extends BlockCraftingUnit
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
{
|
||||
itemStacks.add( new ItemStack( this, 1, 0 ) );
|
||||
itemStacks.add( new ItemStack( this, 1, 1 ) );
|
||||
@@ -83,7 +83,7 @@ public class BlockCraftingStorage extends BlockCraftingUnit
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
public String getUnlocalizedName( final ItemStack is )
|
||||
{
|
||||
if( is.getItemDamage() == 1 )
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
|
||||
final public CraftingUnitType type;
|
||||
|
||||
public BlockCraftingUnit( CraftingUnitType type )
|
||||
public BlockCraftingUnit( final CraftingUnitType type )
|
||||
{
|
||||
super( Material.iron, Optional.of( type.name() ) );
|
||||
|
||||
@@ -71,23 +71,23 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta( int meta )
|
||||
public IBlockState getStateFromMeta( final int meta )
|
||||
{
|
||||
return getDefaultState().withProperty( POWERED, ( meta & 1 ) == 1 ).withProperty( FORMED, ( meta & 2 ) == 2 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState( IBlockState state )
|
||||
public int getMetaFromState( final IBlockState state )
|
||||
{
|
||||
boolean p = (boolean) state.getValue( POWERED );
|
||||
boolean f = (boolean) state.getValue( FORMED );
|
||||
final boolean p = (boolean) state.getValue( POWERED );
|
||||
final boolean f = (boolean) state.getValue( FORMED );
|
||||
return ( p ? 1 : 0 ) | ( f ? 2 : 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( World worldIn, BlockPos pos, IBlockState state, Block neighborBlock )
|
||||
public void onNeighborBlockChange( final World worldIn, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
{
|
||||
TileCraftingTile cp = this.getTileEntity( worldIn, pos );
|
||||
final TileCraftingTile cp = this.getTileEntity( worldIn, pos );
|
||||
if( cp != null )
|
||||
{
|
||||
cp.updateMultiBlock();
|
||||
@@ -101,9 +101,9 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock( World w, BlockPos pos, IBlockState state )
|
||||
public void breakBlock( final World w, final BlockPos pos, final IBlockState state )
|
||||
{
|
||||
TileCraftingTile cp = this.getTileEntity( w, pos );
|
||||
final TileCraftingTile cp = this.getTileEntity( w, pos );
|
||||
if( cp != null )
|
||||
{
|
||||
cp.breakCluster();
|
||||
@@ -113,9 +113,9 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated( World w, BlockPos pos, IBlockState state, EntityPlayer p, EnumFacing side, float hitX, float hitY, float hitZ )
|
||||
public boolean onBlockActivated( final World w, final BlockPos pos, final IBlockState state, final EntityPlayer p, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
TileCraftingTile tg = this.getTileEntity( w, pos );
|
||||
final TileCraftingTile tg = this.getTileEntity( w, pos );
|
||||
if( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
@@ -130,7 +130,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
return false;
|
||||
}
|
||||
|
||||
protected String getItemUnlocalizedName( ItemStack is )
|
||||
protected String getItemUnlocalizedName( final ItemStack is )
|
||||
{
|
||||
return super.getUnlocalizedName( is );
|
||||
}
|
||||
@@ -151,7 +151,7 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public appeng.client.texture.IAESprite getIcon( EnumFacing side, IBlockState state )
|
||||
public appeng.client.texture.IAESprite getIcon( final EnumFacing side, final IBlockState state )
|
||||
{
|
||||
if( type == CraftingUnitType.ACCELERATOR )
|
||||
{
|
||||
@@ -173,14 +173,14 @@ public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
{
|
||||
itemStacks.add( new ItemStack( this, 1, 0 ) );
|
||||
itemStacks.add( new ItemStack( this, 1, 1 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
public String getUnlocalizedName( final ItemStack is )
|
||||
{
|
||||
if( is.getItemDamage() == 1 )
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer(net.minecraft.util.EnumWorldBlockLayer layer) {
|
||||
public boolean canRenderInLayer( final net.minecraft.util.EnumWorldBlockLayer layer) {
|
||||
return layer == EnumWorldBlockLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
@@ -67,16 +67,16 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
TileMolecularAssembler tg = this.getTileEntity( w, pos );
|
||||
final TileMolecularAssembler tg = this.getTileEntity( w, pos );
|
||||
if( tg != null && !p.isSneaking() )
|
||||
{
|
||||
Platform.openGUI( p, tg, AEPartLocation.fromFacing( side ), GuiBridge.GUI_MAC );
|
||||
|
||||
@@ -30,15 +30,15 @@ import appeng.core.features.AEFeature;
|
||||
public class ItemCraftingStorage extends AEBaseItemBlock
|
||||
{
|
||||
|
||||
public ItemCraftingStorage( Block id )
|
||||
public ItemCraftingStorage( final Block id )
|
||||
{
|
||||
super( id );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItem( ItemStack itemStack )
|
||||
public ItemStack getContainerItem( final ItemStack itemStack )
|
||||
{
|
||||
for( ItemStack stack : AEApi.instance().definitions().blocks().craftingUnit().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : AEApi.instance().definitions().blocks().craftingUnit().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ public class ItemCraftingStorage extends AEBaseItemBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasContainerItem( ItemStack stack )
|
||||
public boolean hasContainerItem( final ItemStack stack )
|
||||
{
|
||||
return AEConfig.instance.isFeatureEnabled( AEFeature.enableDisassemblyCrafting );
|
||||
}
|
||||
|
||||
@@ -64,13 +64,13 @@ public class BlockCrank extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer player,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer player,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( player instanceof FakePlayer || player == null )
|
||||
{
|
||||
@@ -78,7 +78,7 @@ public class BlockCrank extends AEBaseTileBlock
|
||||
return true;
|
||||
}
|
||||
|
||||
AEBaseTile tile = this.getTileEntity( w, pos );
|
||||
final AEBaseTile tile = this.getTileEntity( w, pos );
|
||||
if( tile instanceof TileCrank )
|
||||
{
|
||||
if( ( (TileCrank) tile ).power() )
|
||||
@@ -90,7 +90,7 @@ public class BlockCrank extends AEBaseTileBlock
|
||||
return true;
|
||||
}
|
||||
|
||||
private void dropCrank( World world, BlockPos pos )
|
||||
private void dropCrank( final World world, final BlockPos pos )
|
||||
{
|
||||
world.destroyBlock( pos, true ); // w.destroyBlock( x, y, z, true );
|
||||
world.markBlockForUpdate( pos );
|
||||
@@ -98,16 +98,16 @@ public class BlockCrank extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(
|
||||
World world,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
EntityLivingBase placer,
|
||||
ItemStack stack )
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EntityLivingBase placer,
|
||||
final ItemStack stack )
|
||||
{
|
||||
AEBaseTile tile = this.getTileEntity( world, pos );
|
||||
final AEBaseTile tile = this.getTileEntity( world, pos );
|
||||
if( tile != null )
|
||||
{
|
||||
EnumFacing mnt = this.findCrankable( world, pos );
|
||||
final EnumFacing mnt = this.findCrankable( world, pos );
|
||||
EnumFacing forward = EnumFacing.UP;
|
||||
if( mnt == EnumFacing.UP || mnt == EnumFacing.DOWN )
|
||||
{
|
||||
@@ -123,18 +123,18 @@ public class BlockCrank extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean isValidOrientation(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EnumFacing forward,
|
||||
EnumFacing up )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EnumFacing forward,
|
||||
final EnumFacing up )
|
||||
{
|
||||
TileEntity te = w.getTileEntity( pos );
|
||||
final TileEntity te = w.getTileEntity( pos );
|
||||
return !( te instanceof TileCrank ) || this.isCrankable( w, pos, up.getOpposite() );
|
||||
}
|
||||
|
||||
private EnumFacing findCrankable( World world, BlockPos pos )
|
||||
private EnumFacing findCrankable( final World world, final BlockPos pos )
|
||||
{
|
||||
for( EnumFacing dir : EnumFacing.VALUES )
|
||||
for( final EnumFacing dir : EnumFacing.VALUES )
|
||||
{
|
||||
if( this.isCrankable( world, pos, dir ) )
|
||||
{
|
||||
@@ -144,23 +144,23 @@ public class BlockCrank extends AEBaseTileBlock
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean isCrankable( World world, BlockPos pos, EnumFacing offset )
|
||||
private boolean isCrankable( final World world, final BlockPos pos, final EnumFacing offset )
|
||||
{
|
||||
BlockPos o = pos.offset( offset);
|
||||
TileEntity te = world.getTileEntity( o );
|
||||
final BlockPos o = pos.offset( offset);
|
||||
final TileEntity te = world.getTileEntity( o );
|
||||
|
||||
return te instanceof ICrankable && ( (ICrankable) te ).canCrankAttach( offset.getOpposite() );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World world,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
|
||||
AEBaseTile tile = this.getTileEntity( world, pos );
|
||||
final AEBaseTile tile = this.getTileEntity( world, pos );
|
||||
if( tile != null )
|
||||
{
|
||||
if( !this.isCrankable( world, pos, tile.getUp().getOpposite() ) )
|
||||
@@ -175,7 +175,7 @@ public class BlockCrank extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt( World world, BlockPos pos )
|
||||
public boolean canPlaceBlockAt( final World world, final BlockPos pos )
|
||||
{
|
||||
return this.findCrankable( world, pos ) != null;
|
||||
}
|
||||
|
||||
@@ -49,14 +49,14 @@ public class BlockGrinder extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(
|
||||
World worldIn,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
EntityPlayer playerIn,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World worldIn,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EntityPlayer playerIn,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return super.onBlockActivated( worldIn, pos, state, playerIn, side, hitX, hitY, hitZ );
|
||||
@@ -64,15 +64,15 @@ public class BlockGrinder extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
TileGrinder tg = this.getTileEntity( w, pos );
|
||||
final TileGrinder tg = this.getTileEntity( w, pos );
|
||||
if( tg != null && !p.isSneaking() )
|
||||
{
|
||||
Platform.openGUI( p, tg, AEPartLocation.fromFacing( side ), GuiBridge.GUI_GRINDER );
|
||||
|
||||
@@ -47,20 +47,20 @@ public class BlockCellWorkbench extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileCellWorkbench tg = this.getTileEntity( w, pos );
|
||||
final TileCellWorkbench tg = this.getTileEntity( w, pos );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
|
||||
@@ -71,13 +71,13 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer player,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer player,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
@@ -86,7 +86,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
TileCharger tc = this.getTileEntity( w, pos );
|
||||
final TileCharger tc = this.getTileEntity( w, pos );
|
||||
if( tc != null )
|
||||
{
|
||||
tc.activate( player );
|
||||
@@ -99,10 +99,10 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Random r )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
@@ -114,22 +114,22 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
return;
|
||||
}
|
||||
|
||||
AEBaseTile tile = this.getTileEntity( w, pos );
|
||||
final AEBaseTile tile = this.getTileEntity( w, pos );
|
||||
if( tile instanceof TileCharger )
|
||||
{
|
||||
TileCharger tc = (TileCharger) tile;
|
||||
final TileCharger tc = (TileCharger) tile;
|
||||
|
||||
if( AEApi.instance().definitions().materials().certusQuartzCrystalCharged().isSameAs( tc.getStackInSlot( 0 ) ) )
|
||||
{
|
||||
double xOff = 0.0;
|
||||
double yOff = 0.0;
|
||||
double zOff = 0.0;
|
||||
final double xOff = 0.0;
|
||||
final double yOff = 0.0;
|
||||
final double zOff = 0.0;
|
||||
|
||||
for( int bolts = 0; bolts < 3; bolts++ )
|
||||
{
|
||||
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
|
||||
final LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
@@ -139,18 +139,18 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
Entity thePlayer,
|
||||
boolean b )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final Entity thePlayer,
|
||||
final boolean b )
|
||||
{
|
||||
TileCharger tile = this.getTileEntity( w, pos );
|
||||
final TileCharger tile = this.getTileEntity( w, pos );
|
||||
if( tile != null )
|
||||
{
|
||||
double twoPixels = 2.0 / 16.0;
|
||||
EnumFacing up = tile.getUp();
|
||||
EnumFacing forward = tile.getForward();
|
||||
AEAxisAlignedBB bb = AEAxisAlignedBB.fromBounds( twoPixels, twoPixels, twoPixels, 1.0 - twoPixels, 1.0 - twoPixels, 1.0 - twoPixels );
|
||||
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 );
|
||||
|
||||
if( up.getFrontOffsetX() != 0 )
|
||||
{
|
||||
@@ -199,11 +199,11 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
AxisAlignedBB bb,
|
||||
List<AxisAlignedBB> out,
|
||||
Entity e )
|
||||
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 ) );
|
||||
}
|
||||
|
||||
@@ -47,13 +47,13 @@ public class BlockCondenser extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer player,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer player,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
@@ -62,7 +62,7 @@ public class BlockCondenser extends AEBaseTileBlock
|
||||
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
TileCondenser tc = this.getTileEntity( w, pos );
|
||||
final TileCondenser tc = this.getTileEntity( w, pos );
|
||||
if( tc != null && !player.isSneaking() )
|
||||
{
|
||||
Platform.openGUI( player, tc, AEPartLocation.fromFacing( side ), GuiBridge.GUI_CONDENSER );
|
||||
|
||||
@@ -58,20 +58,20 @@ public class BlockInscriber extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileInscriber tg = this.getTileEntity( w, pos );
|
||||
final TileInscriber tg = this.getTileEntity( w, pos );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
@@ -84,7 +84,7 @@ public class BlockInscriber extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
public String getUnlocalizedName( final ItemStack is )
|
||||
{
|
||||
return super.getUnlocalizedName( is );
|
||||
}
|
||||
|
||||
@@ -56,20 +56,20 @@ public class BlockInterface extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileInterface tg = this.getTileEntity( w, pos );
|
||||
final TileInterface tg = this.getTileEntity( w, pos );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
@@ -88,7 +88,7 @@ public class BlockInterface extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void customRotateBlock( IOrientable rotatable, EnumFacing axis )
|
||||
protected void customRotateBlock( final IOrientable rotatable, final EnumFacing axis )
|
||||
{
|
||||
if( rotatable instanceof TileInterface )
|
||||
{
|
||||
|
||||
@@ -62,14 +62,14 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(
|
||||
IBlockState state )
|
||||
final IBlockState state )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(
|
||||
int meta )
|
||||
final int meta )
|
||||
{
|
||||
return getDefaultState();
|
||||
}
|
||||
@@ -82,10 +82,10 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
|
||||
@Override
|
||||
public int isProvidingWeakPower(
|
||||
IBlockAccess w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
EnumFacing side )
|
||||
final IBlockAccess w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EnumFacing side )
|
||||
{
|
||||
if( w instanceof World && ( (TileLightDetector) this.getTileEntity( w, pos ) ).isReady() )
|
||||
{
|
||||
@@ -97,13 +97,13 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
|
||||
@Override
|
||||
public void onNeighborChange(
|
||||
IBlockAccess world,
|
||||
BlockPos pos,
|
||||
BlockPos neighbor )
|
||||
final IBlockAccess world,
|
||||
final BlockPos pos,
|
||||
final BlockPos neighbor )
|
||||
{
|
||||
super.onNeighborChange( world, pos, neighbor );
|
||||
|
||||
TileLightDetector tld = this.getTileEntity( world, pos );
|
||||
final TileLightDetector tld = this.getTileEntity( world, pos );
|
||||
if( tld != null )
|
||||
{
|
||||
tld.updateLight();
|
||||
@@ -112,10 +112,10 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(
|
||||
World worldIn,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Random rand )
|
||||
final World worldIn,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Random rand )
|
||||
{
|
||||
// cancel out lightning
|
||||
}
|
||||
@@ -128,40 +128,40 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
|
||||
@Override
|
||||
public boolean isValidOrientation(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EnumFacing forward,
|
||||
EnumFacing up )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EnumFacing forward,
|
||||
final EnumFacing up )
|
||||
{
|
||||
return this.canPlaceAt( w, pos, up.getOpposite() );
|
||||
}
|
||||
|
||||
private boolean canPlaceAt( World w, BlockPos pos, EnumFacing dir )
|
||||
private boolean canPlaceAt( final World w, final BlockPos pos, final EnumFacing dir )
|
||||
{
|
||||
return w.isSideSolid( pos.offset( dir ), dir.getOpposite(), false );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
Entity thePlayer,
|
||||
boolean b )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final Entity thePlayer,
|
||||
final boolean b )
|
||||
{
|
||||
EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
double xOff = -0.3 * up.getFrontOffsetX();
|
||||
double yOff = -0.3 * up.getFrontOffsetY();
|
||||
double zOff = -0.3 * up.getFrontOffsetZ();
|
||||
final EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
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 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
AxisAlignedBB bb,
|
||||
List<AxisAlignedBB> out,
|
||||
Entity e )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final AxisAlignedBB bb,
|
||||
final List<AxisAlignedBB> out,
|
||||
final Entity e )
|
||||
{/*
|
||||
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 *
|
||||
* getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff
|
||||
@@ -171,19 +171,19 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
final EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
|
||||
{
|
||||
this.dropTorch( w, pos );
|
||||
}
|
||||
}
|
||||
|
||||
private void dropTorch( World w, BlockPos pos )
|
||||
private void dropTorch( final World w, final BlockPos pos )
|
||||
{
|
||||
w.destroyBlock( pos, true );
|
||||
w.markBlockForUpdate( pos );
|
||||
@@ -191,10 +191,10 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(
|
||||
World w,
|
||||
BlockPos pos )
|
||||
final World w,
|
||||
final BlockPos pos )
|
||||
{
|
||||
for( EnumFacing dir : EnumFacing.VALUES )
|
||||
for( final EnumFacing dir : EnumFacing.VALUES )
|
||||
{
|
||||
if( this.canPlaceAt( w, pos, dir ) )
|
||||
{
|
||||
@@ -211,7 +211,7 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOrientable getOrientable( final IBlockAccess w, BlockPos pos )
|
||||
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
return new MetaRotation( w, pos,true );
|
||||
}
|
||||
|
||||
@@ -73,36 +73,36 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox(
|
||||
World worldIn,
|
||||
BlockPos pos,
|
||||
IBlockState state )
|
||||
final World worldIn,
|
||||
final BlockPos pos,
|
||||
final IBlockState state )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCollideCheck(
|
||||
IBlockState state,
|
||||
boolean hitIfLiquid )
|
||||
final IBlockState state,
|
||||
final boolean hitIfLiquid )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
TilePaint tp = this.getTileEntity( w, pos );
|
||||
final TilePaint tp = this.getTileEntity( w, pos );
|
||||
|
||||
if( tp != null )
|
||||
{
|
||||
@@ -112,28 +112,28 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(
|
||||
IBlockState state,
|
||||
Random rand,
|
||||
int fortune )
|
||||
final IBlockState state,
|
||||
final Random rand,
|
||||
final int fortune )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(
|
||||
World worldIn,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
float chance,
|
||||
int fortune )
|
||||
final World worldIn,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final float chance,
|
||||
final int fortune )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillWithRain(
|
||||
World w,
|
||||
BlockPos pos )
|
||||
final World w,
|
||||
final BlockPos pos )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -143,10 +143,10 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public int getLightValue(
|
||||
IBlockAccess w,
|
||||
BlockPos pos )
|
||||
final IBlockAccess w,
|
||||
final BlockPos pos )
|
||||
{
|
||||
TilePaint tp = this.getTileEntity( w, pos );
|
||||
final TilePaint tp = this.getTileEntity( w, pos );
|
||||
|
||||
if( tp != null )
|
||||
{
|
||||
@@ -158,16 +158,16 @@ public class BlockPaint extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean isAir(
|
||||
IBlockAccess world,
|
||||
BlockPos pos )
|
||||
final IBlockAccess world,
|
||||
final BlockPos pos )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReplaceable(
|
||||
World worldIn,
|
||||
BlockPos pos )
|
||||
final World worldIn,
|
||||
final BlockPos pos )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -58,48 +58,47 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Random r )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TileQuartzGrowthAccelerator cga = this.getTileEntity( w, pos );
|
||||
final TileQuartzGrowthAccelerator cga = this.getTileEntity( w, pos );
|
||||
|
||||
if( cga != null && cga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
double d0 = r.nextFloat() - 0.5F;
|
||||
double d1 = r.nextFloat() - 0.5F;
|
||||
final double d0 = r.nextFloat() - 0.5F;
|
||||
final double d1 = r.nextFloat() - 0.5F;
|
||||
|
||||
EnumFacing up = cga.getUp();
|
||||
EnumFacing forward = cga.getForward();
|
||||
EnumFacing west = Platform.crossProduct( forward, up );
|
||||
final EnumFacing up = cga.getUp();
|
||||
final EnumFacing forward = cga.getForward();
|
||||
final EnumFacing west = Platform.crossProduct( forward, up );
|
||||
|
||||
double rx = 0.5 + pos.getX();
|
||||
double ry = 0.5 + pos.getY();
|
||||
double rz = 0.5 + pos.getZ();
|
||||
|
||||
double dx = 0;
|
||||
double dz = 0;
|
||||
|
||||
rx += up.getFrontOffsetX() * d0;
|
||||
ry += up.getFrontOffsetY() * d0;
|
||||
rz += up.getFrontOffsetZ() * d0;
|
||||
|
||||
int x = pos.getX();
|
||||
int y = pos.getY();
|
||||
int z = pos.getZ();
|
||||
|
||||
final int x = pos.getX();
|
||||
final int y = pos.getY();
|
||||
final int z = pos.getZ();
|
||||
|
||||
double dz = 0;
|
||||
double dx = 0;
|
||||
switch( r.nextInt( 4 ) )
|
||||
{
|
||||
case 0:
|
||||
dx = 0.6;
|
||||
dz = d1;
|
||||
BlockPos pt = new BlockPos( x + west.getFrontOffsetX(), y + west.getFrontOffsetY(), z + west.getFrontOffsetZ() );
|
||||
final BlockPos pt = new BlockPos( x + west.getFrontOffsetX(), y + west.getFrontOffsetY(), z + west.getFrontOffsetZ() );
|
||||
if( !w.getBlockState(pt).getBlock().isAir( w, pt) )
|
||||
{
|
||||
return;
|
||||
@@ -142,7 +141,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
|
||||
ry += dz * forward.getFrontOffsetY();
|
||||
rz += dz * forward.getFrontOffsetZ();
|
||||
|
||||
LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D );
|
||||
final LightningFX fx = new LightningFX( w, rx, ry, rz, 0.0D, 0.0D, 0.0D );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,14 +66,14 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(
|
||||
IBlockState state )
|
||||
final IBlockState state )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(
|
||||
int meta )
|
||||
final int meta )
|
||||
{
|
||||
return getDefaultState();
|
||||
}
|
||||
@@ -91,29 +91,29 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidOrientation( World w, BlockPos pos, EnumFacing forward, EnumFacing up )
|
||||
public boolean isValidOrientation( final World w, final BlockPos pos, final EnumFacing forward, final EnumFacing up )
|
||||
{
|
||||
return this.canPlaceAt( w, pos, up.getOpposite() );
|
||||
}
|
||||
|
||||
private boolean canPlaceAt( World w, BlockPos pos, EnumFacing dir )
|
||||
private boolean canPlaceAt( final World w, final BlockPos pos, final EnumFacing dir )
|
||||
{
|
||||
BlockPos test = pos.offset( dir );
|
||||
final BlockPos test = pos.offset( dir );
|
||||
return w.isSideSolid( test, dir.getOpposite(), false );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, BlockPos pos, Entity e, boolean isVisual )
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final World w, final BlockPos pos, final Entity e, final boolean isVisual )
|
||||
{
|
||||
EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
double xOff = -0.3 * up.getFrontOffsetX();
|
||||
double yOff = -0.3 * up.getFrontOffsetY();
|
||||
double zOff = -0.3 * up.getFrontOffsetZ();
|
||||
final EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
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 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList( World w, BlockPos pos, AxisAlignedBB bb, List out, Entity e )
|
||||
public void addCollidingBlockToList( final World w, final BlockPos pos, final AxisAlignedBB bb, final List out, final Entity e )
|
||||
{/*
|
||||
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 *
|
||||
* getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff
|
||||
@@ -124,10 +124,10 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Random r )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
@@ -139,15 +139,15 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
return;
|
||||
}
|
||||
|
||||
EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
double xOff = -0.3 * up.getFrontOffsetX();
|
||||
double yOff = -0.3 * up.getFrontOffsetY();
|
||||
double zOff = -0.3 * up.getFrontOffsetZ();
|
||||
final EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
final double xOff = -0.3 * up.getFrontOffsetX();
|
||||
final double yOff = -0.3 * up.getFrontOffsetY();
|
||||
final double zOff = -0.3 * up.getFrontOffsetZ();
|
||||
for( int bolts = 0; bolts < 3; bolts++ )
|
||||
{
|
||||
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
|
||||
final LightningFX fx = new LightningFX( w, xOff + 0.5 + pos.getX(), yOff + 0.5 + pos.getY(), zOff + 0.5 + pos.getZ(), 0.0D, 0.0D, 0.0D );
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
@@ -156,28 +156,28 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
final EnumFacing up = this.getOrientable( w, pos ).getUp();
|
||||
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
|
||||
{
|
||||
this.dropTorch( w, pos );
|
||||
}
|
||||
}
|
||||
|
||||
private void dropTorch( World w, BlockPos pos )
|
||||
private void dropTorch( final World w, final BlockPos pos )
|
||||
{
|
||||
w.destroyBlock( pos, true );
|
||||
w.markBlockForUpdate( pos );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt( World w, BlockPos pos )
|
||||
public boolean canPlaceBlockAt( final World w, final BlockPos pos )
|
||||
{
|
||||
for( EnumFacing dir : EnumFacing.VALUES )
|
||||
for( final EnumFacing dir : EnumFacing.VALUES )
|
||||
{
|
||||
if( this.canPlaceAt( w, pos, dir ) )
|
||||
{
|
||||
@@ -194,7 +194,7 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOrientable getOrientable( final IBlockAccess w, BlockPos pos )
|
||||
public IOrientable getOrientable( final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
return new MetaRotation( w, pos,true );
|
||||
}
|
||||
|
||||
@@ -62,20 +62,20 @@ public class BlockSecurity extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileSecurity tg = this.getTileEntity( w, pos );
|
||||
final TileSecurity tg = this.getTileEntity( w, pos );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
|
||||
@@ -58,9 +58,9 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidOrientation( World w, BlockPos pos, EnumFacing forward, EnumFacing up )
|
||||
public boolean isValidOrientation( final World w, final BlockPos pos, final EnumFacing forward, final EnumFacing up )
|
||||
{
|
||||
TileSkyCompass sc = this.getTileEntity( w, pos );
|
||||
final TileSkyCompass sc = this.getTileEntity( w, pos );
|
||||
if( sc != null )
|
||||
{
|
||||
return false;
|
||||
@@ -68,27 +68,27 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
return this.canPlaceAt( w, pos, forward.getOpposite() );
|
||||
}
|
||||
|
||||
private boolean canPlaceAt( World w, BlockPos pos, EnumFacing dir )
|
||||
private boolean canPlaceAt( final World w, final BlockPos pos, final EnumFacing dir )
|
||||
{
|
||||
return w.isSideSolid( pos.offset( dir ), dir.getOpposite(), false );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
TileSkyCompass sc = this.getTileEntity( w, pos );
|
||||
EnumFacing up = sc.getForward();
|
||||
final TileSkyCompass sc = this.getTileEntity( w, pos );
|
||||
final EnumFacing up = sc.getForward();
|
||||
if( !this.canPlaceAt( w, pos, up.getOpposite() ) )
|
||||
{
|
||||
this.dropTorch( w, pos );
|
||||
}
|
||||
}
|
||||
|
||||
private void dropTorch( World w, BlockPos pos )
|
||||
private void dropTorch( final World w, final BlockPos pos )
|
||||
{
|
||||
w.destroyBlock( pos, true );
|
||||
w.markBlockForUpdate( pos );
|
||||
@@ -96,10 +96,10 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(
|
||||
World w,
|
||||
BlockPos pos )
|
||||
final World w,
|
||||
final BlockPos pos )
|
||||
{
|
||||
for( EnumFacing dir : EnumFacing.VALUES )
|
||||
for( final EnumFacing dir : EnumFacing.VALUES )
|
||||
{
|
||||
if( this.canPlaceAt( w, pos, dir ) )
|
||||
{
|
||||
@@ -111,15 +111,15 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
Entity thePlayer,
|
||||
boolean b )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final Entity thePlayer,
|
||||
final boolean b )
|
||||
{
|
||||
TileSkyCompass tile = this.getTileEntity( w, pos );
|
||||
final TileSkyCompass tile = this.getTileEntity( w, pos );
|
||||
if( tile != null )
|
||||
{
|
||||
EnumFacing forward = tile.getForward();
|
||||
final EnumFacing forward = tile.getForward();
|
||||
|
||||
double minX = 0;
|
||||
double minY = 0;
|
||||
@@ -177,11 +177,11 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
AxisAlignedBB bb,
|
||||
List<AxisAlignedBB> out,
|
||||
Entity e )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final AxisAlignedBB bb,
|
||||
final List<AxisAlignedBB> out,
|
||||
final Entity e )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( World w, BlockPos pos, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ )
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.flint_and_steel )
|
||||
{
|
||||
@@ -95,18 +95,18 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
}
|
||||
}
|
||||
|
||||
public void startFuse( World w, BlockPos pos, EntityLivingBase igniter )
|
||||
public void startFuse( final World w, final BlockPos pos, final EntityLivingBase igniter )
|
||||
{
|
||||
if( !w.isRemote )
|
||||
{
|
||||
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, igniter );
|
||||
final EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, igniter );
|
||||
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||
w.playSoundAtEntity( primedTinyTNTEntity, "game.tnt.primed", 1.0F, 1.0F );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange( World w, BlockPos pos, IBlockState state, Block neighborBlock )
|
||||
public void onNeighborBlockChange( final World w, final BlockPos pos, final IBlockState state, final Block neighborBlock )
|
||||
{
|
||||
if( w.isBlockIndirectlyGettingPowered( pos ) > 0 )
|
||||
{
|
||||
@@ -116,7 +116,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded( World w, BlockPos pos, IBlockState state )
|
||||
public void onBlockAdded( final World w, final BlockPos pos, final IBlockState state )
|
||||
{
|
||||
super.onBlockAdded( w, pos, state );
|
||||
|
||||
@@ -128,11 +128,11 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock( World w, BlockPos pos, Entity entity )
|
||||
public void onEntityCollidedWithBlock( final World w, final BlockPos pos, final Entity entity )
|
||||
{
|
||||
if( entity instanceof EntityArrow && !w.isRemote )
|
||||
{
|
||||
EntityArrow entityarrow = (EntityArrow) entity;
|
||||
final EntityArrow entityarrow = (EntityArrow) entity;
|
||||
|
||||
if( entityarrow.isBurning() )
|
||||
{
|
||||
@@ -143,30 +143,30 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDropFromExplosion( Explosion exp )
|
||||
public boolean canDropFromExplosion( final Explosion exp )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockExploded( World w, BlockPos pos, Explosion exp )
|
||||
public void onBlockExploded( final World w, final BlockPos pos, final Explosion exp )
|
||||
{
|
||||
if( !w.isRemote )
|
||||
{
|
||||
EntityTinyTNTPrimed primedTinyTNTEntity = new EntityTinyTNTPrimed( w, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, exp.getExplosivePlacedBy() );
|
||||
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;
|
||||
w.spawnEntityInWorld( primedTinyTNTEntity );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, BlockPos pos, Entity thePlayer, boolean b )
|
||||
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 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList( World w, BlockPos pos, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
||||
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 ) );
|
||||
}
|
||||
|
||||
@@ -54,10 +54,10 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public appeng.client.texture.IAESprite getIcon(IBlockAccess w, BlockPos pos, EnumFacing side)
|
||||
public appeng.client.texture.IAESprite getIcon( final IBlockAccess w, final BlockPos pos, final EnumFacing side)
|
||||
{
|
||||
IAESprite ico = super.getIcon( w, pos, side );
|
||||
TileVibrationChamber tvc = this.getTileEntity( w, pos );
|
||||
final IAESprite ico = super.getIcon( w, pos, side );
|
||||
final TileVibrationChamber tvc = this.getTileEntity( w, pos );
|
||||
|
||||
if( tvc != null && tvc.isOn && ico == this.getRendererInstance().getTexture( AEPartLocation.SOUTH ) )
|
||||
{
|
||||
@@ -69,13 +69,13 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer player,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer player,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
@@ -84,7 +84,7 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
TileVibrationChamber tc = this.getTileEntity( w, pos );
|
||||
final TileVibrationChamber tc = this.getTileEntity( w, pos );
|
||||
if( tc != null && !player.isSneaking() )
|
||||
{
|
||||
Platform.openGUI( player, tc, AEPartLocation.fromFacing( side ), GuiBridge.GUI_VIBRATION_CHAMBER );
|
||||
@@ -97,39 +97,39 @@ public final class BlockVibrationChamber extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Random r )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AEBaseTile tile = this.getTileEntity( w, pos );
|
||||
final AEBaseTile tile = this.getTileEntity( w, pos );
|
||||
if( tile instanceof TileVibrationChamber )
|
||||
{
|
||||
TileVibrationChamber tc = (TileVibrationChamber) tile;
|
||||
final TileVibrationChamber tc = (TileVibrationChamber) tile;
|
||||
if( tc.isOn )
|
||||
{
|
||||
float f1 = pos.getX() + 0.5F;
|
||||
float f2 = pos.getY() + 0.5F;
|
||||
float f3 = pos.getZ() + 0.5F;
|
||||
|
||||
EnumFacing forward = tc.getForward();
|
||||
EnumFacing up = tc.getUp();
|
||||
final EnumFacing forward = tc.getForward();
|
||||
final EnumFacing up = tc.getUp();
|
||||
|
||||
int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY();
|
||||
int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
|
||||
int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
|
||||
final int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY();
|
||||
final int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
|
||||
final int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
|
||||
|
||||
f1 += forward.getFrontOffsetX() * 0.6;
|
||||
f2 += forward.getFrontOffsetY() * 0.6;
|
||||
f3 += forward.getFrontOffsetZ() * 0.6;
|
||||
|
||||
float ox = r.nextFloat();
|
||||
float oy = r.nextFloat() * 0.2f;
|
||||
final float ox = r.nextFloat();
|
||||
final float oy = r.nextFloat() * 0.2f;
|
||||
|
||||
f1 += up.getFrontOffsetX() * ( -0.3 + oy );
|
||||
f2 += up.getFrontOffsetY() * ( -0.3 + oy );
|
||||
|
||||
@@ -94,38 +94,38 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(
|
||||
World worldIn,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Random rand )
|
||||
final World worldIn,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Random rand )
|
||||
{
|
||||
this.cb( worldIn, pos ).randomDisplayTick( worldIn, pos, rand );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborChange(
|
||||
IBlockAccess w,
|
||||
BlockPos pos,
|
||||
BlockPos neighbor )
|
||||
final IBlockAccess w,
|
||||
final BlockPos pos,
|
||||
final BlockPos neighbor )
|
||||
{
|
||||
this.cb( w, pos ).onNeighborChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(
|
||||
IBlockState state,
|
||||
Random rand,
|
||||
int fortune )
|
||||
final IBlockState state,
|
||||
final Random rand,
|
||||
final int fortune )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int isProvidingWeakPower(
|
||||
IBlockAccess w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
EnumFacing side )
|
||||
final IBlockAccess w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EnumFacing side )
|
||||
{
|
||||
return this.cb( w, pos ).isProvidingWeakPower( side.getOpposite() ); // TODO: IS OPPOSITE!?
|
||||
}
|
||||
@@ -138,30 +138,30 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Entity entityIn )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Entity entityIn )
|
||||
{
|
||||
this.cb( w, pos ).onEntityCollision( entityIn );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int isProvidingStrongPower(
|
||||
IBlockAccess w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
EnumFacing side )
|
||||
final IBlockAccess w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EnumFacing side )
|
||||
{
|
||||
return this.cb( w, pos ).isProvidingStrongPower( side.getOpposite() ); // TODO: IS OPPOSITE!?
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(
|
||||
IBlockAccess world,
|
||||
BlockPos pos )
|
||||
final IBlockAccess world,
|
||||
final BlockPos pos )
|
||||
{
|
||||
IBlockState block = world.getBlockState( pos );
|
||||
final IBlockState block = world.getBlockState( pos );
|
||||
if( block != null && block.getBlock() != this )
|
||||
{
|
||||
return block.getBlock().getLightValue( world, pos );
|
||||
@@ -174,35 +174,35 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLadder( IBlockAccess world, BlockPos pos, EntityLivingBase entity )
|
||||
public boolean isLadder( final IBlockAccess world, final BlockPos pos, final EntityLivingBase entity )
|
||||
{
|
||||
return this.cb( world, pos ).isLadder( entity );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid( IBlockAccess w, BlockPos pos, EnumFacing side )
|
||||
public boolean isSideSolid( final IBlockAccess w, final BlockPos pos, final EnumFacing side )
|
||||
{
|
||||
return this.cb( w, pos ).isSolidOnSide( side );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReplaceable(
|
||||
World w,
|
||||
BlockPos pos )
|
||||
final World w,
|
||||
final BlockPos pos )
|
||||
{
|
||||
return this.cb( w, pos ).isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(
|
||||
World world,
|
||||
BlockPos pos,
|
||||
EntityPlayer player,
|
||||
boolean willHarvest )
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer player,
|
||||
final boolean willHarvest )
|
||||
{
|
||||
if( player.capabilities.isCreativeMode )
|
||||
{
|
||||
AEBaseTile tile = this.getTileEntity( world, pos );
|
||||
final AEBaseTile tile = this.getTileEntity( world, pos );
|
||||
if( tile != null )
|
||||
{
|
||||
tile.disableDrops();
|
||||
@@ -214,8 +214,8 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
|
||||
@Override
|
||||
public boolean canConnectRedstone(
|
||||
IBlockAccess w,
|
||||
BlockPos pos,
|
||||
final IBlockAccess w,
|
||||
final BlockPos pos,
|
||||
EnumFacing side )
|
||||
{
|
||||
if ( side == null )
|
||||
@@ -226,7 +226,7 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer(
|
||||
EnumWorldBlockLayer layer )
|
||||
final EnumWorldBlockLayer layer )
|
||||
{
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
||||
{
|
||||
@@ -238,12 +238,12 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(
|
||||
MovingObjectPosition target,
|
||||
World world,
|
||||
BlockPos pos )
|
||||
final MovingObjectPosition target,
|
||||
final World world,
|
||||
final BlockPos pos )
|
||||
{
|
||||
Vec3 v3 = target.hitVec.subtract( pos.getX(), pos.getY(), pos.getZ() );
|
||||
SelectedPart sp = this.cb( world, pos ).selectPart( v3 );
|
||||
final Vec3 v3 = target.hitVec.subtract( pos.getX(), pos.getY(), pos.getZ() );
|
||||
final SelectedPart sp = this.cb( world, pos ).selectPart( v3 );
|
||||
|
||||
if( sp.part != null )
|
||||
{
|
||||
@@ -259,12 +259,12 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public boolean addHitEffects( World world, MovingObjectPosition target, EffectRenderer effectRenderer )
|
||||
public boolean addHitEffects( final World world, final MovingObjectPosition target, final EffectRenderer effectRenderer )
|
||||
{
|
||||
Object object = this.cb( world, target.getBlockPos() );
|
||||
final Object object = this.cb( world, target.getBlockPos() );
|
||||
if( object instanceof IPartHost )
|
||||
{
|
||||
IPartHost host = (IPartHost) object;
|
||||
final IPartHost host = (IPartHost) object;
|
||||
|
||||
// TODO HIT EFFECTS
|
||||
/*
|
||||
@@ -310,14 +310,14 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
|
||||
@Override
|
||||
public boolean addDestroyEffects(
|
||||
World world,
|
||||
BlockPos pos,
|
||||
EffectRenderer effectRenderer )
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final EffectRenderer effectRenderer )
|
||||
{
|
||||
Object object = this.cb( world, pos );
|
||||
final Object object = this.cb( world, pos );
|
||||
if( object instanceof IPartHost )
|
||||
{
|
||||
IPartHost host = (IPartHost) object;
|
||||
final IPartHost host = (IPartHost) object;
|
||||
|
||||
// TODO DESTROY EFFECTS
|
||||
/*
|
||||
@@ -359,10 +359,10 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -370,9 +370,9 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
}
|
||||
}
|
||||
|
||||
private ICableBusContainer cb( IBlockAccess w, BlockPos pos )
|
||||
private ICableBusContainer cb( final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
TileEntity te = w.getTileEntity( pos );
|
||||
final TileEntity te = w.getTileEntity( pos );
|
||||
ICableBusContainer out = null;
|
||||
|
||||
if( te instanceof TileCableBus )
|
||||
@@ -395,54 +395,54 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer player,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer player,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
return this.cb( w, pos ).activate( player, new Vec3( hitX, hitY, hitZ ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolorBlock(
|
||||
World world,
|
||||
BlockPos pos,
|
||||
EnumFacing side,
|
||||
EnumDyeColor color )
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final EnumFacing side,
|
||||
final EnumDyeColor color )
|
||||
{
|
||||
return this.recolorBlock( world, pos, side, color, null );
|
||||
}
|
||||
|
||||
public boolean recolorBlock(
|
||||
World world,
|
||||
BlockPos pos,
|
||||
EnumFacing side,
|
||||
EnumDyeColor color,
|
||||
EntityPlayer who )
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final EnumFacing side,
|
||||
final EnumDyeColor color,
|
||||
final EntityPlayer who )
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.cb( world, pos ).recolourBlock( side, AEColor.values()[ color.ordinal() ], who );
|
||||
}
|
||||
catch( Throwable ignored )
|
||||
catch( final Throwable ignored )
|
||||
{}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, BlockPos pos )
|
||||
public <T extends AEBaseTile> T getTileEntity( final IBlockAccess w, final BlockPos pos )
|
||||
{
|
||||
TileEntity te = w.getTileEntity( pos );
|
||||
final TileEntity te = w.getTileEntity( pos );
|
||||
|
||||
if( noTesrTile.isInstance( te ) )
|
||||
{
|
||||
@@ -458,7 +458,7 @@ public class BlockCableBus extends AEBaseTileBlock //implements IRedNetConnectio
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setFeature( EnumSet<AEFeature> f )
|
||||
protected void setFeature( final EnumSet<AEFeature> f )
|
||||
{
|
||||
final AECableBusFeatureHandler featureHandler = new AECableBusFeatureHandler( f, this, this.featureSubName );
|
||||
this.setHandler( featureHandler );
|
||||
|
||||
@@ -62,13 +62,13 @@ public class BlockController extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(
|
||||
IBlockState state )
|
||||
final IBlockState state )
|
||||
{
|
||||
return ((ControllerBlockState)state.getValue( CONTROLLER_STATE )).ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta( int meta )
|
||||
public IBlockState getStateFromMeta( final int meta )
|
||||
{
|
||||
return getDefaultState().withProperty( CONTROLLER_STATE, ControllerBlockState.OFFLINE );
|
||||
}
|
||||
@@ -89,12 +89,12 @@ public class BlockController extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
TileController tc = this.getTileEntity( w, pos );
|
||||
final TileController tc = this.getTileEntity( w, pos );
|
||||
if( tc != null )
|
||||
{
|
||||
tc.onNeighborChange( false );
|
||||
|
||||
@@ -36,7 +36,7 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
|
||||
}
|
||||
|
||||
@Override
|
||||
public appeng.client.texture.IAESprite getIcon(net.minecraft.util.EnumFacing side, net.minecraft.block.state.IBlockState state)
|
||||
public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final net.minecraft.block.state.IBlockState state)
|
||||
{
|
||||
switch( (int)state.getValue( ENERGY_STORAGE ) )
|
||||
{
|
||||
|
||||
@@ -50,13 +50,13 @@ public class BlockEnergyCell extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(
|
||||
IBlockState state )
|
||||
final IBlockState state )
|
||||
{
|
||||
return (int)state.getValue( ENERGY_STORAGE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta( int meta )
|
||||
public IBlockState getStateFromMeta( final int meta )
|
||||
{
|
||||
return getDefaultState().withProperty( ENERGY_STORAGE, Math.min( 7, Math.max( 0, meta ) ) );
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class BlockEnergyCell extends AEBaseTileBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public appeng.client.texture.IAESprite getIcon(net.minecraft.util.EnumFacing side, IBlockState state)
|
||||
public appeng.client.texture.IAESprite getIcon( final net.minecraft.util.EnumFacing side, final IBlockState state)
|
||||
{
|
||||
switch( (int)state.getValue( ENERGY_STORAGE ) )
|
||||
{
|
||||
@@ -102,12 +102,12 @@ public class BlockEnergyCell extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
{
|
||||
super.getCheckedSubBlocks( item, tabs, itemStacks );
|
||||
|
||||
ItemStack charged = new ItemStack( this, 1 );
|
||||
NBTTagCompound tag = Platform.openNbtData( charged );
|
||||
final ItemStack charged = new ItemStack( this, 1 );
|
||||
final NBTTagCompound tag = Platform.openNbtData( charged );
|
||||
tag.setDouble( "internalCurrentPower", this.getMaxPower() );
|
||||
tag.setDouble( "internalMaxPower", this.getMaxPower() );
|
||||
|
||||
|
||||
@@ -70,21 +70,21 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
EntityPlayer player,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final EntityPlayer player,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileWireless tg = this.getTileEntity( w, pos );
|
||||
final TileWireless tg = this.getTileEntity( w, pos );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
@@ -98,15 +98,15 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
Entity thePlayer,
|
||||
boolean b )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final Entity thePlayer,
|
||||
final boolean b )
|
||||
{
|
||||
TileWireless tile = this.getTileEntity( w, pos );
|
||||
final TileWireless tile = this.getTileEntity( w, pos );
|
||||
if( tile != null )
|
||||
{
|
||||
EnumFacing forward = tile.getForward();
|
||||
final EnumFacing forward = tile.getForward();
|
||||
|
||||
double minX = 0;
|
||||
double minY = 0;
|
||||
@@ -164,16 +164,16 @@ public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
AxisAlignedBB bb,
|
||||
List<AxisAlignedBB> out,
|
||||
Entity e )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final AxisAlignedBB bb,
|
||||
final List<AxisAlignedBB> out,
|
||||
final Entity e )
|
||||
{
|
||||
TileWireless tile = this.getTileEntity( w, pos );
|
||||
final TileWireless tile = this.getTileEntity( w, pos );
|
||||
if( tile != null )
|
||||
{
|
||||
EnumFacing forward = tile.getForward();
|
||||
final EnumFacing forward = tile.getForward();
|
||||
|
||||
double minX = 0;
|
||||
double minY = 0;
|
||||
|
||||
@@ -37,11 +37,11 @@ import appeng.tile.qnb.TileQuantumBridge;
|
||||
public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICustomCollision
|
||||
{
|
||||
|
||||
public BlockQuantumBase( Material mat )
|
||||
public BlockQuantumBase( final Material mat )
|
||||
{
|
||||
super( mat );
|
||||
this.setTileEntity( TileQuantumBridge.class );
|
||||
float shave = 2.0f / 16.0f;
|
||||
final float shave = 2.0f / 16.0f;
|
||||
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
|
||||
this.setLightOpacity( 0 );
|
||||
this.isFullSize = this.isOpaque = false;
|
||||
@@ -56,12 +56,12 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
final TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
if( bridge != null )
|
||||
{
|
||||
bridge.neighborUpdate();
|
||||
@@ -70,11 +70,11 @@ public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICusto
|
||||
|
||||
@Override
|
||||
public void breakBlock(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state )
|
||||
{
|
||||
TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
final TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
if( bridge != null )
|
||||
{
|
||||
bridge.breakCluster();
|
||||
|
||||
@@ -50,12 +50,12 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Random rand )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Random rand )
|
||||
{
|
||||
TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
final TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
if( bridge != null )
|
||||
{
|
||||
if( bridge.hasQES() )
|
||||
@@ -70,20 +70,20 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileQuantumBridge tg = this.getTileEntity( w, pos );
|
||||
final TileQuantumBridge tg = this.getTileEntity( w, pos );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
@@ -97,24 +97,24 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
Entity thePlayer,
|
||||
boolean b )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final Entity thePlayer,
|
||||
final boolean b )
|
||||
{
|
||||
double onePixel = 2.0 / 16.0;
|
||||
final double onePixel = 2.0 / 16.0;
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
AxisAlignedBB bb,
|
||||
List<AxisAlignedBB> out,
|
||||
Entity e )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final AxisAlignedBB bb,
|
||||
final List<AxisAlignedBB> out,
|
||||
final Entity e )
|
||||
{
|
||||
double onePixel = 2.0 / 16.0;
|
||||
final double onePixel = 2.0 / 16.0;
|
||||
out.add( AxisAlignedBB.fromBounds( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,13 +41,13 @@ public class BlockQuantumRing extends BlockQuantumBase
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
Entity thePlayer,
|
||||
boolean b )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final Entity thePlayer,
|
||||
final boolean b )
|
||||
{
|
||||
double onePixel = 2.0 / 16.0;
|
||||
TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
final TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
if( bridge != null && bridge.isCorner() )
|
||||
{
|
||||
onePixel = 4.0 / 16.0;
|
||||
@@ -61,14 +61,14 @@ public class BlockQuantumRing extends BlockQuantumBase
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
AxisAlignedBB bb,
|
||||
List<AxisAlignedBB> out,
|
||||
Entity e )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final AxisAlignedBB bb,
|
||||
final List<AxisAlignedBB> out,
|
||||
final Entity e )
|
||||
{
|
||||
double onePixel = 2.0 / 16.0;
|
||||
TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
final TileQuantumBridge bridge = this.getTileEntity( w, pos );
|
||||
if( bridge != null && bridge.isCorner() )
|
||||
{
|
||||
onePixel = 4.0 / 16.0;
|
||||
|
||||
@@ -63,17 +63,17 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
public void getCheckedSubBlocks( final Item item, final CreativeTabs tabs, final List<ItemStack> itemStacks )
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
Entity thePlayer,
|
||||
boolean b )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final Entity thePlayer,
|
||||
final boolean b )
|
||||
{
|
||||
return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 )
|
||||
// } );
|
||||
@@ -81,37 +81,37 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
AxisAlignedBB bb,
|
||||
List<AxisAlignedBB> out,
|
||||
Entity e )
|
||||
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 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(
|
||||
World worldIn,
|
||||
BlockPos pos )
|
||||
final World worldIn,
|
||||
final BlockPos pos )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockExploded(
|
||||
World world,
|
||||
BlockPos pos,
|
||||
Explosion explosion )
|
||||
final World world,
|
||||
final BlockPos pos,
|
||||
final Explosion explosion )
|
||||
{
|
||||
// Don't explode.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEntityDestroy(
|
||||
IBlockAccess world,
|
||||
BlockPos pos,
|
||||
Entity entity )
|
||||
final IBlockAccess world,
|
||||
final BlockPos pos,
|
||||
final Entity entity )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -48,12 +48,12 @@ public class BlockSpatialIOPort extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
TileSpatialIOPort te = this.getTileEntity( w, pos );
|
||||
final TileSpatialIOPort te = this.getTileEntity( w, pos );
|
||||
if( te != null )
|
||||
{
|
||||
te.updateRedstoneState();
|
||||
@@ -62,20 +62,20 @@ public class BlockSpatialIOPort extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileSpatialIOPort tg = this.getTileEntity( w, pos );
|
||||
final TileSpatialIOPort tg = this.getTileEntity( w, pos );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
|
||||
@@ -46,12 +46,12 @@ public class BlockSpatialPylon extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
TileSpatialPylon tsp = this.getTileEntity( w, pos );
|
||||
final TileSpatialPylon tsp = this.getTileEntity( w, pos );
|
||||
if( tsp != null )
|
||||
{
|
||||
tsp.onNeighborBlockChange();
|
||||
@@ -60,10 +60,10 @@ public class BlockSpatialPylon extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public int getLightValue(
|
||||
IBlockAccess w,
|
||||
BlockPos pos )
|
||||
final IBlockAccess w,
|
||||
final BlockPos pos )
|
||||
{
|
||||
TileSpatialPylon tsp = this.getTileEntity( w, pos );
|
||||
final TileSpatialPylon tsp = this.getTileEntity( w, pos );
|
||||
if( tsp != null )
|
||||
{
|
||||
return tsp.getLightValue();
|
||||
|
||||
@@ -65,15 +65,15 @@ public class BlockChest extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
TileChest tg = this.getTileEntity( w, pos );
|
||||
final TileChest tg = this.getTileEntity( w, pos );
|
||||
if( tg != null && !p.isSneaking() )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
@@ -87,10 +87,10 @@ public class BlockChest extends AEBaseTileBlock
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemStack cell = tg.getStackInSlot( 1 );
|
||||
final ItemStack cell = tg.getStackInSlot( 1 );
|
||||
if( cell != null )
|
||||
{
|
||||
ICellHandler ch = AEApi.instance().registries().cell().getHandler( cell );
|
||||
final ICellHandler ch = AEApi.instance().registries().cell().getHandler( cell );
|
||||
|
||||
tg.openGui( p, ch, cell, side );
|
||||
}
|
||||
|
||||
@@ -61,20 +61,20 @@ public class BlockDrive extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileDrive tg = this.getTileEntity( w, pos );
|
||||
final TileDrive tg = this.getTileEntity( w, pos );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
|
||||
@@ -48,12 +48,12 @@ public class BlockIOPort extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
IBlockState state,
|
||||
Block neighborBlock )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final IBlockState state,
|
||||
final Block neighborBlock )
|
||||
{
|
||||
TileIOPort te = this.getTileEntity( w, pos );
|
||||
final TileIOPort te = this.getTileEntity( w, pos );
|
||||
if( te != null )
|
||||
{
|
||||
te.updateRedstoneState();
|
||||
@@ -62,20 +62,20 @@ public class BlockIOPort extends AEBaseTileBlock
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer p,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer p,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileIOPort tg = this.getTileEntity( w, pos );
|
||||
final TileIOPort tg = this.getTileEntity( w, pos );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
|
||||
@@ -54,7 +54,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
public final SkyChestType type;
|
||||
|
||||
public BlockSkyChest( SkyChestType type )
|
||||
public BlockSkyChest( final SkyChestType type )
|
||||
{
|
||||
super( Material.rock, Optional.of( type.name() ) );
|
||||
this.setTileEntity( TileSkyChest.class );
|
||||
@@ -75,13 +75,13 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public boolean onActivated(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
EntityPlayer player,
|
||||
EnumFacing side,
|
||||
float hitX,
|
||||
float hitY,
|
||||
float hitZ )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final EntityPlayer player,
|
||||
final EnumFacing side,
|
||||
final float hitX,
|
||||
final float hitY,
|
||||
final float hitZ )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -93,12 +93,12 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
Entity thePlayer,
|
||||
boolean b )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final Entity thePlayer,
|
||||
final boolean b )
|
||||
{
|
||||
TileSkyChest sk = this.getTileEntity( w, pos );
|
||||
final TileSkyChest sk = this.getTileEntity( w, pos );
|
||||
EnumFacing o = EnumFacing.UP;
|
||||
|
||||
if( sk != null )
|
||||
@@ -106,21 +106,21 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||
o = sk.getUp();
|
||||
}
|
||||
|
||||
double offsetX = o.getFrontOffsetX() == 0 ? 0.06 : 0.0;
|
||||
double offsetY = o.getFrontOffsetY() == 0 ? 0.06 : 0.0;
|
||||
double offsetZ = o.getFrontOffsetZ() == 0 ? 0.06 : 0.0;
|
||||
final double offsetX = o.getFrontOffsetX() == 0 ? 0.06 : 0.0;
|
||||
final double offsetY = o.getFrontOffsetY() == 0 ? 0.06 : 0.0;
|
||||
final double offsetZ = o.getFrontOffsetZ() == 0 ? 0.06 : 0.0;
|
||||
|
||||
double sc = 0.06;
|
||||
final double sc = 0.06;
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( Math.max( 0.0, offsetX - o.getFrontOffsetX() * sc ), Math.max( 0.0, offsetY - o.getFrontOffsetY() * sc ), Math.max( 0.0, offsetZ - o.getFrontOffsetZ() * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.getFrontOffsetX() * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.getFrontOffsetY() * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.getFrontOffsetZ() * sc ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList(
|
||||
World w,
|
||||
BlockPos pos,
|
||||
AxisAlignedBB bb,
|
||||
List<AxisAlignedBB> out,
|
||||
Entity e )
|
||||
final World w,
|
||||
final BlockPos pos,
|
||||
final AxisAlignedBB bb,
|
||||
final List<AxisAlignedBB> out,
|
||||
final Entity e )
|
||||
{
|
||||
out.add( AxisAlignedBB.fromBounds( 0.05, 0.05, 0.05, 0.95, 0.95, 0.95 ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user