Puts everywhere brackets

This commit is contained in:
thatsIch
2015-04-29 02:30:53 +02:00
parent 23aa8fd72d
commit 64ed05a1b4
465 changed files with 6726 additions and 14 deletions
@@ -118,7 +118,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
for( AxisAlignedBB bx : this.cb.getSelectedBoundingBoxesFromPool( false, true, null, true ) )
{
if( b == null )
{
b = bx;
}
else
{
double minX = Math.min( b.minX, bx.minX );
@@ -132,7 +134,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
}
if( b == null )
{
return new Cuboid6( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 );
}
return new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ );
}
@@ -251,9 +255,13 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
if( sp != null )
{
if( sp.part != null )
{
return sp.part.getItemStack( PartItemStack.Break );
}
if( sp.facade != null )
{
return sp.facade.getItemStack();
}
}
return null;
}
@@ -372,7 +380,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
IPart fPart = this.getPart( whichSide );
if( fPart != null )
{
fPart.getBoxes( bch );
}
}
AxisAlignedBB b = null;
@@ -383,7 +393,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
if( bb.intersectsWith( pb ) )
{
if( b == null )
{
b = bb;
}
else
{
b.maxX = Math.max( b.maxX, bb.maxX );
@@ -397,7 +409,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
}
if( b == null )
{
return 0;
}
switch( dir )
{
@@ -433,9 +447,13 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
for( ForgeDirection side : ForgeDirection.values() )
{
if( this.getPart( side ) != null )
{
mask |= 1 << side.ordinal();
}
else if( side != ForgeDirection.UNKNOWN && this.getFacadeContainer().getFacade( side ) != null )
{
mask |= 1 << side.ordinal();
}
}
return mask;
@@ -520,7 +538,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
public void markForUpdate()
{
if( Platform.isServer() && this.canUpdate )
{
this.sendDescUpdate();
}
}
@Override
@@ -554,7 +574,9 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
public boolean isBlocked( ForgeDirection side )
{
if( side == null || side == ForgeDirection.UNKNOWN || this.tile() == null )
{
return false;
}
DISABLE_FACADE_OCCLUSION.set( true );
boolean blocked = !this.tile().canAddPart( new NormallyOccludedPart( SIDE_TESTS[side.ordinal()] ) );
@@ -575,14 +597,18 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
// mark the chunk for save...
TileEntity te = this.tile();
if( te != null && te.getWorldObj() != null )
{
te.getWorldObj().getChunkFromBlockCoords( this.x(), this.z() ).isModified = true;
}
}
@Override
public void partChanged()
{
if( this.isInWorld() )
{
this.notifyNeighbors();
}
}
@Override
@@ -622,10 +648,14 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
public void notifyNeighbors()
{
if( this.tile() instanceof TIInventoryTile )
{
( (TIInventoryTile) this.tile() ).rebuildSlotMap();
}
if( this.world() != null && this.world().blockExists( this.x(), this.y(), this.z() ) && !CableBusContainer.isLoading() )
{
Platform.notifyBlocksOfNeighbors( this.world(), this.x(), this.y(), this.z() );
}
}
@Override
+14
View File
@@ -64,7 +64,9 @@ public class FMPEvent
{
MovingObjectPosition hit = RayTracer.reTrace( world, player );
if( hit == null )
{
return false;
}
BlockCoord pos = new BlockCoord( hit.blockX, hit.blockY, hit.blockZ ).offset( hit.sideHit );
ItemStack held = player.getHeldItem();
@@ -73,7 +75,9 @@ public class FMPEvent
Block blk = null;
if( held == null )
{
return false;
}
if( held.getItem() instanceof AEBaseItemBlock )
{
@@ -83,7 +87,9 @@ public class FMPEvent
}
if( part == null )
{
return false;
}
if( world.isRemote && !player.isSneaking() )// attempt to use block activated like normal and tell the server
// the right stuff
@@ -100,7 +106,9 @@ public class FMPEvent
TileMultipart tile = TileMultipart.getOrConvertTile( world, pos );
if( tile == null || !tile.canAddPart( part ) )
{
return false;
}
if( !world.isRemote )
{
@@ -130,7 +138,9 @@ public class FMPEvent
private static boolean ignoreActivate( Block block )
{
if( block instanceof BlockFence )
{
return true;
}
return false;
}
@@ -140,10 +150,14 @@ public class FMPEvent
if( event.action == Action.RIGHT_CLICK_BLOCK && event.entityPlayer.worldObj.isRemote )
{
if( this.placing.get() != null )
{
return;
}
this.placing.set( event );
if( place( event.entityPlayer, event.entityPlayer.worldObj ) )
{
event.setCanceled( true );
}
this.placing.set( null );
}
}
@@ -62,7 +62,9 @@ public class FMPPlacementHelper implements IPartHost
public IFacadeContainer getFacadeContainer()
{
if( this.myPart == null )
{
return new FacadeContainer( NULL_STORAGE );
}
return this.myPart.getFacadeContainer();
}
@@ -85,11 +87,15 @@ public class FMPPlacementHelper implements IPartHost
{
TMultiPart p = i.next();
if( p instanceof CableBusPart )
{
this.myPart = (CableBusPart) p;
}
}
if( this.myPart == null )
{
this.myPart = (CableBusPart) PartRegistry.CableBusPart.construct( 0 );
}
BlockCoord loc = new BlockCoord( this.myMP.xCoord, this.myMP.yCoord, this.myMP.zCoord );
@@ -137,7 +143,9 @@ public class FMPPlacementHelper implements IPartHost
public IPart getPart( ForgeDirection side )
{
if( this.myPart == null )
{
return null;
}
return this.myPart.getPart( side );
}
@@ -145,7 +153,9 @@ public class FMPPlacementHelper implements IPartHost
public void removePart( ForgeDirection side, boolean suppressUpdate )
{
if( this.myPart == null )
{
return;
}
this.myPart.removePart( side, suppressUpdate );
}
@@ -153,7 +163,9 @@ public class FMPPlacementHelper implements IPartHost
public void markForUpdate()
{
if( this.myPart == null )
{
return;
}
this.myPart.markForUpdate();
}
@@ -161,7 +173,9 @@ public class FMPPlacementHelper implements IPartHost
public DimensionalCoord getLocation()
{
if( this.myPart == null )
{
return new DimensionalCoord( this.myMP );
}
return this.myPart.getLocation();
}
@@ -175,7 +189,9 @@ public class FMPPlacementHelper implements IPartHost
public AEColor getColor()
{
if( this.myPart == null )
{
return AEColor.Transparent;
}
return this.myPart.getColor();
}
@@ -183,7 +199,9 @@ public class FMPPlacementHelper implements IPartHost
public void clearContainer()
{
if( this.myPart == null )
{
return;
}
this.myPart.clearContainer();
}
@@ -203,7 +221,9 @@ public class FMPPlacementHelper implements IPartHost
public SelectedPart selectPart( Vec3 pos )
{
if( this.myPart == null )
{
return new SelectedPart();
}
return this.myPart.selectPart( pos );
}
@@ -211,7 +231,9 @@ public class FMPPlacementHelper implements IPartHost
public void markForSave()
{
if( this.myPart == null )
{
return;
}
this.myPart.markForSave();
}
@@ -219,7 +241,9 @@ public class FMPPlacementHelper implements IPartHost
public void partChanged()
{
if( this.myPart == null )
{
return;
}
this.myPart.partChanged();
}
@@ -227,7 +251,9 @@ public class FMPPlacementHelper implements IPartHost
public boolean hasRedstone( ForgeDirection side )
{
if( this.myPart == null )
{
return false;
}
return this.myPart.hasRedstone( side );
}
@@ -235,7 +261,9 @@ public class FMPPlacementHelper implements IPartHost
public boolean isEmpty()
{
if( this.myPart == null )
{
return true;
}
return this.myPart.isEmpty();
}
@@ -243,7 +271,9 @@ public class FMPPlacementHelper implements IPartHost
public Set<LayerFlags> getLayerFlags()
{
if( this.myPart == null )
{
return EnumSet.noneOf( LayerFlags.class );
}
return this.myPart.getLayerFlags();
}
@@ -251,7 +281,9 @@ public class FMPPlacementHelper implements IPartHost
public void cleanup()
{
if( this.myPart == null )
{
return;
}
this.myPart.cleanup();
}
@@ -259,7 +291,9 @@ public class FMPPlacementHelper implements IPartHost
public void notifyNeighbors()
{
if( this.myPart == null )
{
return;
}
this.myPart.notifyNeighbors();
}
@@ -267,7 +301,9 @@ public class FMPPlacementHelper implements IPartHost
public boolean isInWorld()
{
if( this.myPart == null )
{
return this.myMP.getWorldObj() != null;
}
return this.myPart.isInWorld();
}
@@ -75,9 +75,13 @@ public enum PartRegistry
try
{
if( this == CableBusPart )
{
return (TMultiPart) Api.INSTANCE.partHelper().getCombinedInstance( this.part.getName() ).newInstance();
}
else
{
return this.part.getConstructor( int.class ).newInstance( meta );
}
}
catch( Throwable t )
{