Removes unnecessary returns

This commit is contained in:
thatsIch 2014-09-29 09:47:17 +02:00
parent 640d888d13
commit 0ee0a70f1a
6 changed files with 2 additions and 25 deletions

View file

@ -313,6 +313,7 @@ public class ClientHelper extends ServerHelper
case LightningArc: case LightningArc:
spawnLightningArc( worldObj, posX, posY, posZ, (Vec3) o ); spawnLightningArc( worldObj, posX, posY, posZ, (Vec3) o );
return; return;
default:
} }
} }
} }

View file

@ -581,9 +581,7 @@ public abstract class AEBaseContainer extends Container
if ( syncData.containsKey( idx ) ) if ( syncData.containsKey( idx ) )
{ {
syncData.get( idx ).update( (long) value ); syncData.get( idx ).update( (long) value );
return;
} }
} }
final public void updateFullProgressBar(int idx, long value) final public void updateFullProgressBar(int idx, long value)
@ -602,7 +600,6 @@ public abstract class AEBaseContainer extends Container
if ( syncData.containsKey( idx ) ) if ( syncData.containsKey( idx ) )
{ {
syncData.get( idx ).update( value ); syncData.get( idx ).update( value );
return;
} }
} }

View file

@ -39,9 +39,7 @@ public class SyncDat
try try
{ {
Object val = field.get( source ); Object val = field.get( source );
if ( val == clientVersion ) if ( val != null && clientVersion == null )
return;
else if ( val != null && clientVersion == null )
send( c, val ); send( c, val );
else if ( !val.equals( clientVersion ) ) else if ( !val.equals( clientVersion ) )
send( c, val ); send( c, val );

View file

@ -58,55 +58,46 @@ public class PacketValueConfig extends AppEngPacket
ItemStack is = player.getHeldItem(); ItemStack is = player.getHeldItem();
IMouseWheelItem si = (IMouseWheelItem) is.getItem(); IMouseWheelItem si = (IMouseWheelItem) is.getItem();
si.onWheel( is, Value.equals( "WheelUp" ) ); si.onWheel( is, Value.equals( "WheelUp" ) );
return;
} }
else if ( Name.equals( "Terminal.Cpu" ) && c instanceof ContainerCraftingStatus ) else if ( Name.equals( "Terminal.Cpu" ) && c instanceof ContainerCraftingStatus )
{ {
ContainerCraftingStatus qk = (ContainerCraftingStatus) c; ContainerCraftingStatus qk = (ContainerCraftingStatus) c;
qk.cycleCpu( Value.equals( "Next" ) ); qk.cycleCpu( Value.equals( "Next" ) );
return;
} }
else if ( Name.equals( "Terminal.Cpu" ) && c instanceof ContainerCraftConfirm ) else if ( Name.equals( "Terminal.Cpu" ) && c instanceof ContainerCraftConfirm )
{ {
ContainerCraftConfirm qk = (ContainerCraftConfirm) c; ContainerCraftConfirm qk = (ContainerCraftConfirm) c;
qk.cycleCpu( Value.equals( "Next" ) ); qk.cycleCpu( Value.equals( "Next" ) );
return;
} }
else if ( Name.equals( "Terminal.Start" ) && c instanceof ContainerCraftConfirm ) else if ( Name.equals( "Terminal.Start" ) && c instanceof ContainerCraftConfirm )
{ {
ContainerCraftConfirm qk = (ContainerCraftConfirm) c; ContainerCraftConfirm qk = (ContainerCraftConfirm) c;
qk.startJob(); qk.startJob();
return;
} }
else if ( Name.equals( "TileCrafting.Cancel" ) && c instanceof ContainerCraftingCPU ) else if ( Name.equals( "TileCrafting.Cancel" ) && c instanceof ContainerCraftingCPU )
{ {
ContainerCraftingCPU qk = (ContainerCraftingCPU) c; ContainerCraftingCPU qk = (ContainerCraftingCPU) c;
qk.cancelCrafting(); qk.cancelCrafting();
return;
} }
else if ( Name.equals( "QuartzKnife.Name" ) && c instanceof ContainerQuartzKnife ) else if ( Name.equals( "QuartzKnife.Name" ) && c instanceof ContainerQuartzKnife )
{ {
ContainerQuartzKnife qk = (ContainerQuartzKnife) c; ContainerQuartzKnife qk = (ContainerQuartzKnife) c;
qk.setName( Value ); qk.setName( Value );
return;
} }
else if ( Name.equals( "TileSecurity.ToggleOption" ) && c instanceof ContainerSecurity ) else if ( Name.equals( "TileSecurity.ToggleOption" ) && c instanceof ContainerSecurity )
{ {
ContainerSecurity sc = (ContainerSecurity) c; ContainerSecurity sc = (ContainerSecurity) c;
sc.toggleSetting( Value, player ); sc.toggleSetting( Value, player );
return;
} }
else if ( Name.equals( "PriorityHost.Priority" ) && c instanceof ContainerPriority ) else if ( Name.equals( "PriorityHost.Priority" ) && c instanceof ContainerPriority )
{ {
ContainerPriority pc = (ContainerPriority) c; ContainerPriority pc = (ContainerPriority) c;
pc.setPriority( Integer.parseInt( Value ), player ); pc.setPriority( Integer.parseInt( Value ), player );
return;
} }
else if ( Name.equals( "LevelEmitter.Value" ) && c instanceof ContainerLevelEmitter ) else if ( Name.equals( "LevelEmitter.Value" ) && c instanceof ContainerLevelEmitter )
{ {
ContainerLevelEmitter lvc = (ContainerLevelEmitter) c; ContainerLevelEmitter lvc = (ContainerLevelEmitter) c;
lvc.setLevel( Long.parseLong( Value ), player ); lvc.setLevel( Long.parseLong( Value ), player );
return;
} }
else if ( Name.startsWith( "PatternTerminal." ) && c instanceof ContainerPatternTerm ) else if ( Name.startsWith( "PatternTerminal." ) && c instanceof ContainerPatternTerm )
{ {
@ -213,7 +204,6 @@ public class PacketValueConfig extends AppEngPacket
GuiScreen gs = Minecraft.getMinecraft().currentScreen; GuiScreen gs = Minecraft.getMinecraft().currentScreen;
if ( gs instanceof GuiCraftingCPU ) if ( gs instanceof GuiCraftingCPU )
((GuiCraftingCPU) gs).clearItems(); ((GuiCraftingCPU) gs).clearItems();
return;
} }
else if ( c instanceof IConfigurableObject ) else if ( c instanceof IConfigurableObject )
{ {

View file

@ -101,7 +101,6 @@ final public class EntityGrowingCrystal extends EntityItem
progress_1000 = 0; progress_1000 = 0;
CommonHelper.proxy.spawnEffect( EffectType.Vibrant, worldObj, posX, posY + 0.2, posZ, null ); CommonHelper.proxy.spawnEffect( EffectType.Vibrant, worldObj, posX, posY + 0.2, posZ, null );
} }
return;
} }
else else
{ {

View file

@ -311,8 +311,6 @@ public class FacadePart implements IFacadePart, IBoxProvider
instance.renderForPass( 0 ); instance.renderForPass( 0 );
instance.setTexture( null ); instance.setTexture( null );
Tessellator.instance.setColorOpaque_F( 1, 1, 1 ); Tessellator.instance.setColorOpaque_F( 1, 1, 1 );
return;
} }
} }
} }
@ -321,8 +319,6 @@ public class FacadePart implements IFacadePart, IBoxProvider
AELog.error( t ); AELog.error( t );
} }
return;
} }
} }
@ -485,8 +481,6 @@ public class FacadePart implements IFacadePart, IBoxProvider
instance.renderInventoryBox( renderer ); instance.renderInventoryBox( renderer );
instance.setTexture( null ); instance.setTexture( null );
return;
} }
} }
} }
@ -494,8 +488,6 @@ public class FacadePart implements IFacadePart, IBoxProvider
{ {
} }
return;
} }
} }