From 0ee0a70f1abc27a159e5533478c43bafed46bf46 Mon Sep 17 00:00:00 2001 From: thatsIch Date: Mon, 29 Sep 2014 09:47:17 +0200 Subject: [PATCH] Removes unnecessary returns --- src/main/java/appeng/client/ClientHelper.java | 1 + src/main/java/appeng/container/AEBaseContainer.java | 3 --- src/main/java/appeng/container/guisync/SyncDat.java | 4 +--- .../appeng/core/sync/packets/PacketValueConfig.java | 10 ---------- src/main/java/appeng/entity/EntityGrowingCrystal.java | 1 - src/main/java/appeng/facade/FacadePart.java | 8 -------- 6 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/main/java/appeng/client/ClientHelper.java b/src/main/java/appeng/client/ClientHelper.java index 1b16c869..57da8495 100644 --- a/src/main/java/appeng/client/ClientHelper.java +++ b/src/main/java/appeng/client/ClientHelper.java @@ -313,6 +313,7 @@ public class ClientHelper extends ServerHelper case LightningArc: spawnLightningArc( worldObj, posX, posY, posZ, (Vec3) o ); return; + default: } } } diff --git a/src/main/java/appeng/container/AEBaseContainer.java b/src/main/java/appeng/container/AEBaseContainer.java index 7a939dd7..2eb1af5a 100644 --- a/src/main/java/appeng/container/AEBaseContainer.java +++ b/src/main/java/appeng/container/AEBaseContainer.java @@ -581,9 +581,7 @@ public abstract class AEBaseContainer extends Container if ( syncData.containsKey( idx ) ) { syncData.get( idx ).update( (long) value ); - return; } - } final public void updateFullProgressBar(int idx, long value) @@ -602,7 +600,6 @@ public abstract class AEBaseContainer extends Container if ( syncData.containsKey( idx ) ) { syncData.get( idx ).update( value ); - return; } } diff --git a/src/main/java/appeng/container/guisync/SyncDat.java b/src/main/java/appeng/container/guisync/SyncDat.java index 004ed8c5..d326ae86 100644 --- a/src/main/java/appeng/container/guisync/SyncDat.java +++ b/src/main/java/appeng/container/guisync/SyncDat.java @@ -39,9 +39,7 @@ public class SyncDat try { Object val = field.get( source ); - if ( val == clientVersion ) - return; - else if ( val != null && clientVersion == null ) + if ( val != null && clientVersion == null ) send( c, val ); else if ( !val.equals( clientVersion ) ) send( c, val ); diff --git a/src/main/java/appeng/core/sync/packets/PacketValueConfig.java b/src/main/java/appeng/core/sync/packets/PacketValueConfig.java index fb4ffba8..2d74eaad 100644 --- a/src/main/java/appeng/core/sync/packets/PacketValueConfig.java +++ b/src/main/java/appeng/core/sync/packets/PacketValueConfig.java @@ -58,55 +58,46 @@ public class PacketValueConfig extends AppEngPacket ItemStack is = player.getHeldItem(); IMouseWheelItem si = (IMouseWheelItem) is.getItem(); si.onWheel( is, Value.equals( "WheelUp" ) ); - return; } else if ( Name.equals( "Terminal.Cpu" ) && c instanceof ContainerCraftingStatus ) { ContainerCraftingStatus qk = (ContainerCraftingStatus) c; qk.cycleCpu( Value.equals( "Next" ) ); - return; } else if ( Name.equals( "Terminal.Cpu" ) && c instanceof ContainerCraftConfirm ) { ContainerCraftConfirm qk = (ContainerCraftConfirm) c; qk.cycleCpu( Value.equals( "Next" ) ); - return; } else if ( Name.equals( "Terminal.Start" ) && c instanceof ContainerCraftConfirm ) { ContainerCraftConfirm qk = (ContainerCraftConfirm) c; qk.startJob(); - return; } else if ( Name.equals( "TileCrafting.Cancel" ) && c instanceof ContainerCraftingCPU ) { ContainerCraftingCPU qk = (ContainerCraftingCPU) c; qk.cancelCrafting(); - return; } else if ( Name.equals( "QuartzKnife.Name" ) && c instanceof ContainerQuartzKnife ) { ContainerQuartzKnife qk = (ContainerQuartzKnife) c; qk.setName( Value ); - return; } else if ( Name.equals( "TileSecurity.ToggleOption" ) && c instanceof ContainerSecurity ) { ContainerSecurity sc = (ContainerSecurity) c; sc.toggleSetting( Value, player ); - return; } else if ( Name.equals( "PriorityHost.Priority" ) && c instanceof ContainerPriority ) { ContainerPriority pc = (ContainerPriority) c; pc.setPriority( Integer.parseInt( Value ), player ); - return; } else if ( Name.equals( "LevelEmitter.Value" ) && c instanceof ContainerLevelEmitter ) { ContainerLevelEmitter lvc = (ContainerLevelEmitter) c; lvc.setLevel( Long.parseLong( Value ), player ); - return; } else if ( Name.startsWith( "PatternTerminal." ) && c instanceof ContainerPatternTerm ) { @@ -213,7 +204,6 @@ public class PacketValueConfig extends AppEngPacket GuiScreen gs = Minecraft.getMinecraft().currentScreen; if ( gs instanceof GuiCraftingCPU ) ((GuiCraftingCPU) gs).clearItems(); - return; } else if ( c instanceof IConfigurableObject ) { diff --git a/src/main/java/appeng/entity/EntityGrowingCrystal.java b/src/main/java/appeng/entity/EntityGrowingCrystal.java index 35ad6970..1761d3a2 100644 --- a/src/main/java/appeng/entity/EntityGrowingCrystal.java +++ b/src/main/java/appeng/entity/EntityGrowingCrystal.java @@ -101,7 +101,6 @@ final public class EntityGrowingCrystal extends EntityItem progress_1000 = 0; CommonHelper.proxy.spawnEffect( EffectType.Vibrant, worldObj, posX, posY + 0.2, posZ, null ); } - return; } else { diff --git a/src/main/java/appeng/facade/FacadePart.java b/src/main/java/appeng/facade/FacadePart.java index c0dbca5a..4921b072 100644 --- a/src/main/java/appeng/facade/FacadePart.java +++ b/src/main/java/appeng/facade/FacadePart.java @@ -311,8 +311,6 @@ public class FacadePart implements IFacadePart, IBoxProvider instance.renderForPass( 0 ); instance.setTexture( null ); Tessellator.instance.setColorOpaque_F( 1, 1, 1 ); - - return; } } } @@ -321,8 +319,6 @@ public class FacadePart implements IFacadePart, IBoxProvider AELog.error( t ); } - - return; } } @@ -485,8 +481,6 @@ public class FacadePart implements IFacadePart, IBoxProvider instance.renderInventoryBox( renderer ); instance.setTexture( null ); - - return; } } } @@ -494,8 +488,6 @@ public class FacadePart implements IFacadePart, IBoxProvider { } - - return; } }