From 5f71714993bc69d8b5c47217ed1f0bba480e617f Mon Sep 17 00:00:00 2001 From: LemADEC Date: Fri, 13 Nov 2015 21:57:00 +0100 Subject: [PATCH] Code cleanup --- .../block/detection/BlockCloakingCore.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCore.java b/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCore.java index 26155c3d..69c1d83c 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCore.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockCloakingCore.java @@ -16,7 +16,7 @@ import cr0s.warpdrive.WarpDrive; public class BlockCloakingCore extends BlockContainer { private IIcon[] iconBuffer; - + public BlockCloakingCore() { super(Material.rock); setHardness(0.5F); @@ -24,28 +24,28 @@ public class BlockCloakingCore extends BlockContainer { setCreativeTab(WarpDrive.creativeTabWarpDrive); this.setBlockName("warpdrive.detection.CloakingCore"); } - + @Override public void registerBlockIcons(IIconRegister par1IconRegister) { iconBuffer = new IIcon[2]; iconBuffer[0] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoreInactive"); iconBuffer[1] = par1IconRegister.registerIcon("warpdrive:detection/cloakingCoreActive"); } - + @Override public IIcon getIcon(int side, int metadata) { if (metadata < iconBuffer.length) { return iconBuffer[metadata]; - } else { - return null; } + + return null; } - + @Override public TileEntity createNewTileEntity(World var1, int i) { return new TileEntityCloakingCore(); } - + /** * Returns the quantity of items to drop on block destruction. */ @@ -53,21 +53,21 @@ public class BlockCloakingCore extends BlockContainer { public int quantityDropped(Random par1Random) { return 1; } - + /** - * Returns the ID of the items to drop on destruction. + * Returns the item to drop on destruction. */ @Override public Item getItemDropped(int par1, Random par2Random, int par3) { return Item.getItemFromBlock(this); } - + @Override public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { if (FMLCommonHandler.instance().getEffectiveSide().isClient()) { return false; } - + TileEntityCloakingCore tileEntity = (TileEntityCloakingCore)par1World.getTileEntity(par2, par3, par4); if (tileEntity != null && (par5EntityPlayer.getHeldItem() == null)) { WarpDrive.addChatMessage(par5EntityPlayer, tileEntity.getStatus() @@ -77,19 +77,19 @@ public class BlockCloakingCore extends BlockContainer { ((tileEntity.isCloaking) ? "\nA tier " + tileEntity.tier + " cloak is currently covering " + tileEntity.volume + " blocks!" : "\nCloak needs more power!")))); return true; } - + return false; } - + @Override public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) { TileEntity te = par1World.getTileEntity(par2, par3, par4); - + if (te != null && te instanceof TileEntityCloakingCore) { ((TileEntityCloakingCore)te).isEnabled = false; ((TileEntityCloakingCore)te).disableCloakingField(); } - + super.breakBlock(par1World, par2, par3, par4, par5, par6); } }