Formatted code

This commit is contained in:
yueh
2015-12-24 02:03:16 +01:00
parent e94a0cfccf
commit c9e8a6e939
216 changed files with 1196 additions and 1187 deletions
@@ -161,7 +161,7 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
return super.onItemUse( is, player, w, pos, side, hx, hy, hz );
}
}
@Override
public boolean doesSneakBypassUse(
final World world,
@@ -53,9 +53,10 @@ import appeng.util.Platform;
import com.google.common.base.Optional;
// TODO BC Integration
//@Interface( iface = "buildcraft.api.tools.IToolWrench", iname = IntegrationType.BuildCraftCore )
public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /*, IToolWrench */
public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /* , IToolWrench */
{
public ToolNetworkTool()
@@ -83,20 +84,20 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
if( mop == null )
{
this.onItemUseFirst( it, p, w, new BlockPos(0,0,0), null, 0,0,0 ); // eh?
this.onItemUseFirst( it, p, w, new BlockPos( 0, 0, 0 ), null, 0, 0, 0 ); // eh?
}
else
{
if( w.getBlockState( mop.getBlockPos() ).getBlock().isAir( w, mop.getBlockPos() ) )
{
this.onItemUseFirst( it, p, w, new BlockPos(0,0,0), null, 0,0,0 ); // eh?
this.onItemUseFirst( it, p, w, new BlockPos( 0, 0, 0 ), null, 0, 0, 0 ); // eh?
}
}
}
return it;
}
@Override
public boolean onItemUseFirst(
final ItemStack stack,
@@ -209,5 +210,5 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
}
// TODO: BC WRENCH INTEGRATION
}
@@ -175,7 +175,7 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
}
// clean paint balls..
final Block testBlk = w.getBlockState( pos.offset( side ) ).getBlock();
final Block testBlk = w.getBlockState( pos.offset( side ) ).getBlock();
final TileEntity painted = w.getTileEntity( pos.offset( side ) );
if( this.getAECurrentPower( is ) > powerPerUse && testBlk instanceof BlockPaint && painted instanceof TilePaint )
{
@@ -368,50 +368,50 @@ public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCe
private boolean recolourBlock( final Block blk, final EnumFacing side, final World w, final BlockPos pos, final EnumFacing orientation, final AEColor newColor, final EntityPlayer p )
{
final IBlockState state = w.getBlockState( pos );
if( blk instanceof BlockColored )
{
final EnumDyeColor color = ( EnumDyeColor ) state.getValue( BlockColored.COLOR );
final EnumDyeColor color = (EnumDyeColor) state.getValue( BlockColored.COLOR );
if( newColor.dye == color )
{
return false;
}
return w.setBlockState( pos, state.withProperty( BlockColored.COLOR, newColor.dye ) );
}
if( blk == Blocks.glass )
{
return w.setBlockState( pos, Blocks.stained_glass.getDefaultState().withProperty( BlockStainedGlass.COLOR, newColor.dye) );
return w.setBlockState( pos, Blocks.stained_glass.getDefaultState().withProperty( BlockStainedGlass.COLOR, newColor.dye ) );
}
if( blk == Blocks.stained_glass )
{
final EnumDyeColor color = ( EnumDyeColor ) state.getValue( BlockStainedGlass.COLOR );
final EnumDyeColor color = (EnumDyeColor) state.getValue( BlockStainedGlass.COLOR );
if( newColor.dye == color )
{
return false;
}
return w.setBlockState( pos, state.withProperty( BlockStainedGlass.COLOR, newColor.dye ) );
}
if( blk == Blocks.glass_pane )
{
return w.setBlockState( pos, Blocks.stained_glass_pane.getDefaultState().withProperty( BlockStainedGlassPane.COLOR, newColor.dye) );
return w.setBlockState( pos, Blocks.stained_glass_pane.getDefaultState().withProperty( BlockStainedGlassPane.COLOR, newColor.dye ) );
}
if( blk == Blocks.stained_glass_pane )
{
final EnumDyeColor color = ( EnumDyeColor ) state.getValue( BlockStainedGlassPane.COLOR );
final EnumDyeColor color = (EnumDyeColor) state.getValue( BlockStainedGlassPane.COLOR );
if( newColor.dye == color )
{
return false;
}
return w.setBlockState( pos, state.withProperty( BlockStainedGlassPane.COLOR, newColor.dye ) );
}
@@ -303,8 +303,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
final TileEntity te = w.getTileEntity( hitPos );
if( te instanceof TilePaint )
{
final Vec3 hp = pos.hitVec.subtract( hitPos.getX(), hitPos.getY(), hitPos.getZ() );
( (TilePaint) te ).addBlot( type, side.getOpposite(), hp );
final Vec3 hp = pos.hitVec.subtract( hitPos.getX(), hitPos.getY(), hitPos.getZ() );
( (TilePaint) te ).addBlot( type, side.getOpposite(), hp );
}
}
}
@@ -141,4 +141,4 @@ package appeng.items.tools.powered.powersink;
// {
// return this;
// }
//}
// }
@@ -61,4 +61,4 @@ package appeng.items.tools.powered.powersink;
// {
// return (int) PowerUnits.AE.convertTo( PowerUnits.RF, this.getAEMaxPower( is ) );
// }
//}
// }
@@ -18,6 +18,7 @@
package appeng.items.tools.powered.powersink;
/*
@Interface(iface = "universalelectricity.core.item.IItemElectric", modid = "IC2")
public class UniversalElectricity extends ThermalExpansion implements IItemElectric
@@ -36,9 +36,10 @@ import appeng.util.Platform;
import com.google.common.base.Optional;
// TODO BC Integration
//@Interface( iface = "buildcraft.api.tools.IToolWrench", iname = IntegrationType.BuildCraftCore )
public class ToolQuartzWrench extends AEBaseItem implements IAEWrench /*, IToolWrench */
public class ToolQuartzWrench extends AEBaseItem implements IAEWrench /* , IToolWrench */
{
public ToolQuartzWrench( final AEFeature type )
@@ -99,16 +100,15 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench /*, IToolW
// TODO: BC Wrench Integration
/*
@Override
public boolean canWrench( EntityPlayer player, int x, int y, int z )
{
return true;
}
@Override
public void wrenchUsed( EntityPlayer player, int x, int y, int z )
{
player.swingItem();
}
*/
* @Override
* public boolean canWrench( EntityPlayer player, int x, int y, int z )
* {
* return true;
* }
* @Override
* public void wrenchUsed( EntityPlayer player, int x, int y, int z )
* {
* player.swingItem();
* }
*/
}