Skip to content

Commit

Permalink
run through formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Feb 5, 2014
1 parent d20a827 commit 3406628
Show file tree
Hide file tree
Showing 32 changed files with 1,946 additions and 1,736 deletions.
4 changes: 2 additions & 2 deletions src/main/java/tmechworks/blocks/DynamoBlock.java
Expand Up @@ -15,12 +15,12 @@ public DynamoBlock()
super(Material.iron);
this.setCreativeTab(TMechworksRegistry.Mechworks);
}

public int getRenderType ()
{
return -1;
}

@Override
public boolean shouldSideBeRendered (IBlockAccess iblockaccess, int x, int y, int z, int side)
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tmechworks/blocks/RedstoneMachine.java
Expand Up @@ -430,7 +430,7 @@ protected void dropDrawbridgeLogic (World world, int x, int y, int z, ItemStack
public ItemStack getPickBlock (MovingObjectPosition target, World world, int x, int y, int z)
{
Item id = getItem(world, x, y, z);

int meta = getDamageValue(world, x, y, z);
if (meta != 1 && meta < 4)
{
Expand Down
237 changes: 99 additions & 138 deletions src/main/java/tmechworks/blocks/SignalBus.java

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions src/main/java/tmechworks/blocks/SignalTerminal.java
Expand Up @@ -167,8 +167,7 @@ public int tickRate (World par1World)
public boolean canPlaceBlockAt (World world, int x, int y, int z)
{
return world.isSideSolid(x - 1, y, z, ForgeDirection.EAST) || world.isSideSolid(x + 1, y, z, ForgeDirection.WEST) || world.isSideSolid(x, y, z - 1, ForgeDirection.SOUTH)
|| world.isSideSolid(x, y, z + 1, ForgeDirection.NORTH) || world.isSideSolid(x, y - 1, z, ForgeDirection.UP)
|| world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN);
|| world.isSideSolid(x, y, z + 1, ForgeDirection.NORTH) || world.isSideSolid(x, y - 1, z, ForgeDirection.UP) || world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN);
}

/**
Expand Down Expand Up @@ -214,8 +213,7 @@ public void setBlockBoundsBasedOnState (IBlockAccess world, int x, int y, int z)
public boolean canBlockStay (World world, int x, int y, int z)
{
return world.isSideSolid(x - 1, y, z, ForgeDirection.EAST) || world.isSideSolid(x + 1, y, z, ForgeDirection.WEST) || world.isSideSolid(x, y, z - 1, ForgeDirection.SOUTH)
|| world.isSideSolid(x, y, z + 1, ForgeDirection.NORTH) || world.isSideSolid(x, y - 1, z, ForgeDirection.UP)
|| world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN);
|| world.isSideSolid(x, y, z + 1, ForgeDirection.NORTH) || world.isSideSolid(x, y - 1, z, ForgeDirection.UP) || world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN);
}

@Override
Expand Down Expand Up @@ -468,8 +466,6 @@ public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase
((SignalTerminalLogic) te).connectPending();
}
}



@Override
public ArrayList<ItemStack> getDrops (World world, int x, int y, int z, int metadata, int fortune)
Expand All @@ -484,13 +480,13 @@ public void breakBlock (World world, int x, int y, int z, Block id, int meta)
float jumpX, jumpY, jumpZ;
ItemStack tempStack;
Random rand = new Random();

TileEntity te = world.getTileEntity(x, y, z);
if (te instanceof SignalTerminalLogic)
{
dropTerm = ((SignalTerminalLogic) te).getDroppedTerminals();
dropWire = ((SignalTerminalLogic) te).getDroppedWire();

if (dropTerm > 0)
{
tempStack = new ItemStack(TMechworks.content.signalTerminal, dropTerm, 0);
Expand Down
Expand Up @@ -57,7 +57,7 @@ public void setWorldObj (World par1World)
{
this.worldObj = par1World;
if (!par1World.isRemote)
fakePlayer = new FakePlayerLogic((WorldServer)worldObj, new GameProfile(null, "Player.Drawbridge"), (InventoryLogic)this);
fakePlayer = new FakePlayerLogic((WorldServer) worldObj, new GameProfile(null, "Player.Drawbridge"), (InventoryLogic) this);
}

@Override
Expand Down Expand Up @@ -481,7 +481,7 @@ boolean validBlock (int slot, Block block)
if (blockToItem == getStackInBufferSlot(slot).getItem())
return true;
}
return ComparisonHelper.areEquivalent(getStackInBufferSlot(slot).getItem(),block);
return ComparisonHelper.areEquivalent(getStackInBufferSlot(slot).getItem(), block);
}

boolean validMetadata (int slot, Block block, int metadata)
Expand Down Expand Up @@ -607,7 +607,7 @@ public Packet getDescriptionPacket ()
}

@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readFromNBT(packet.func_148857_g());
worldObj.func_147479_m(xCoord, yCoord, zCoord);
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/tmechworks/blocks/logic/DrawbridgeLogic.java
Expand Up @@ -395,8 +395,7 @@ public void updateEntity ()
int meta = worldObj.getBlockMetadata(xPos, yPos, zPos);
if (bufferStack != null && validBlock(block) && validMetadata(block, meta) && validDrawbridge(xPos, yPos, zPos))
{
worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "tile.piston.in", 0.25F,
worldObj.rand.nextFloat() * 0.15F + 0.6F);
worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "tile.piston.in", 0.25F, worldObj.rand.nextFloat() * 0.15F + 0.6F);
if (WorldHelper.setBlockToAirBool(worldObj, xPos, yPos, zPos))
if (inventory[0] == null)
{
Expand Down Expand Up @@ -600,13 +599,13 @@ public boolean hasCustomInventoryName ()
public void closeInventory ()
{
// TODO Auto-generated method stub

}

@Override
public void openInventory ()
{
// TODO Auto-generated method stub

}
}
4 changes: 2 additions & 2 deletions src/main/java/tmechworks/blocks/logic/FirestarterLogic.java
Expand Up @@ -70,7 +70,7 @@ void setFire ()
Block block = worldObj.getBlock(xPos, yPos, zPos);
if (active)
{
// TMechworks.logger.info("Setting fire");
// TMechworks.logger.info("Setting fire");
if (block == null || WorldHelper.isAirBlock(worldObj, xPos, yPos, zPos))
{
worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "fire.ignite", 1.0F, AbilityHelper.random.nextFloat() * 0.4F + 0.8F);
Expand Down Expand Up @@ -188,7 +188,7 @@ public Packet getDescriptionPacket ()
}

@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
readCustomNBT(packet.func_148857_g());
worldObj.func_147479_m(xCoord, yCoord, zCoord);
Expand Down

0 comments on commit 3406628

Please sign in to comment.