Code format

This commit is contained in:
yueh
2015-08-06 18:49:57 +02:00
parent c21a44d8c0
commit 9c8deac9de
119 changed files with 430 additions and 401 deletions
@@ -37,7 +37,7 @@ public class BCPipeHandler implements IExternalStorageHandler
@Override
public boolean canHandle( TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc )
{
if ( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
{
final IBuildCraftTransport bc = (IBuildCraftTransport) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BuildCraftTransport );
@@ -196,7 +196,7 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
if( recipe.getOptionalOutput() != null )
{
final int chancePercent = (int) (recipe.getOptionalChance() * 100);
final int chancePercent = (int) ( recipe.getOptionalChance() * 100 );
this.hasOptional = true;
this.displayChance = String.format( GuiText.OfSecondOutput.getLocal(), chancePercent );
@@ -18,6 +18,7 @@
package appeng.integration.modules;
import li.cil.oc.api.Items;
import appeng.api.AEApi;
@@ -25,6 +26,7 @@ import appeng.api.config.TunnelType;
import appeng.api.features.IP2PTunnelRegistry;
import appeng.integration.BaseModule;
public class OpenComputers extends BaseModule
{
public static OpenComputers instance;
@@ -54,8 +54,8 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
/**
* Used cache for channels if the channel was not transmitted through the server.
* <p/>
* This is useful, when a player just started to look at a tile
* and thus just requested the new information from the server.
* This is useful, when a player just started to look at a tile and thus just requested the new information from the
* server.
* <p/>
* The cache will be updated from the server.
*/
@@ -64,10 +64,10 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
/**
* Adds the used and max channel to the tool tip
*
* @param part being looked at part
* @param part being looked at part
* @param currentToolTip current tool tip
* @param accessor wrapper for various world information
* @param config config to react to various settings
* @param accessor wrapper for various world information
* @param config config to react to various settings
*
* @return modified tool tip
*/
@@ -91,12 +91,11 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
/**
* Determines the source of the channel.
* <p/>
* If the client received information of the channels on the server, they are used,
* else if the cache contains a previous stored value, this will be used.
* Default value is 0.
* If the client received information of the channels on the server, they are used, else if the cache contains a
* previous stored value, this will be used. Default value is 0.
*
* @param part part to be looked at
* @param tag tag maybe containing the channel information
* @param part part to be looked at
* @param tag tag maybe containing the channel information
* @param cache cache with previous knowledge
*
* @return used channels on the cable
@@ -125,18 +124,17 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
/**
* Called on server to transfer information from server to client.
* <p/>
* If the part is a cable,
* it writes the channel information in the {@code #tag}
* using the {@code ID_USED_CHANNELS} key.
* If the part is a cable, it writes the channel information in the {@code #tag} using the {@code ID_USED_CHANNELS}
* key.
*
* @param player player looking at the part
* @param part part being looked at
* @param te host of the part
* @param tag transferred tag which is send to the client
* @param world world of the part
* @param x x pos of the part
* @param y y pos of the part
* @param z z pos of the part
* @param part part being looked at
* @param te host of the part
* @param tag transferred tag which is send to the client
* @param world world of the part
* @param x x pos of the part
* @param y y pos of the part
* @param z z pos of the part
*
* @return tag send to the client
*/
@@ -34,7 +34,8 @@ import appeng.api.parts.IPart;
/**
* An abstraction layer of the {@link appeng.integration.modules.waila.part.IPartWailaDataProvider} for {@link appeng.api.parts.IPart}.
* An abstraction layer of the {@link appeng.integration.modules.waila.part.IPartWailaDataProvider} for
* {@link appeng.api.parts.IPart}.
*
* @author thatsIch
* @version rv2
@@ -42,10 +42,10 @@ public final class PartAccessor
/**
* Hits a {@link appeng.api.parts.IPartHost} with {@link net.minecraft.util.MovingObjectPosition}.
* <p/>
* You can derive the looked at {@link appeng.api.parts.IPart} by doing that.
* If a facade is being looked at, it is defined as being absent.
* You can derive the looked at {@link appeng.api.parts.IPart} by doing that. If a facade is being looked at, it is
* defined as being absent.
*
* @param te being looked at {@link net.minecraft.tileentity.TileEntity}
* @param te being looked at {@link net.minecraft.tileentity.TileEntity}
* @param mop type of ray-trace
*
* @return maybe the looked at {@link appeng.api.parts.IPart}
@@ -18,6 +18,7 @@
package appeng.integration.modules.waila.part;
import net.minecraft.item.ItemStack;
import mcp.mobius.waila.api.IWailaConfigHandler;
@@ -25,14 +26,16 @@ import mcp.mobius.waila.api.IWailaConfigHandler;
import appeng.api.parts.IPart;
import appeng.api.parts.PartItemStack;
/**
* Part ItemStack provider for WAILA
* Part ItemStack provider for WAILA
*
* @author TheJulianJES
* @version rv2
* @since rv2
*/
public class PartStackWailaDataProvider extends BasePartWailaDataProvider {
public class PartStackWailaDataProvider extends BasePartWailaDataProvider
{
@Override
public ItemStack getWailaStack( IPart part, IWailaConfigHandler config, ItemStack partStack )
@@ -41,10 +41,10 @@ public final class PowerStateWailaDataProvider extends BasePartWailaDataProvider
/**
* Adds state to the tooltip
*
* @param part part with state
* @param part part with state
* @param currentToolTip to be added to tooltip
* @param accessor wrapper for various information
* @param config config settings
* @param accessor wrapper for various information
* @param config config settings
*
* @return modified tooltip
*/
@@ -64,7 +64,7 @@ public final class PowerStateWailaDataProvider extends BasePartWailaDataProvider
/**
* Gets the corresponding tool tip for different values of {@code #isActive} and {@code #isPowered}
*
* @param isActive if part is active
* @param isActive if part is active
* @param isPowered if part is powered
*
* @return tooltip of the state
@@ -45,10 +45,10 @@ public final class StorageMonitorWailaDataProvider extends BasePartWailaDataProv
* Displays the stack if present and if the monitor is locked.
* Can handle fluids and items.
*
* @param part maybe storage monitor
* @param part maybe storage monitor
* @param currentToolTip to be written to tooltip
* @param accessor information wrapper
* @param config config option
* @param accessor information wrapper
* @param config config option
*
* @return modified tooltip
*/
@@ -40,11 +40,11 @@ public final class Tracer
* Trace view of players to blocks.
* Ignore all which are out of reach.
*
* @param world word of block
* @param world word of block
* @param player player viewing block
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
* @param x x pos of block
* @param y y pos of block
* @param z z pos of block
*
* @return trace movement. Can be null
*/
@@ -72,7 +72,7 @@ public final class Tracer
Vec3 v = Vec3.createVectorHelper( player.posX, player.posY, player.posZ );
if( player.worldObj.isRemote )
{
//compatibility with eye height changing mods
// compatibility with eye height changing mods
v.yCoord += player.getEyeHeight() - player.getDefaultEyeHeight();
}
else
@@ -46,10 +46,10 @@ public final class ChargerWailaDataProvider extends BaseWailaDataProvider
/**
* Displays the holding item and its tooltip
*
* @param itemStack stack of charger
* @param itemStack stack of charger
* @param currentToolTip unmodified tooltip
* @param accessor wrapper information
* @param config config option
* @param accessor wrapper information
* @param config config option
*
* @return modified tooltip
*/
@@ -45,10 +45,10 @@ public final class CraftingMonitorWailaDataProvider extends BaseWailaDataProvide
/**
* Displays the item currently crafted by the CPU cluster
*
* @param itemStack stack of crafting monitor
* @param itemStack stack of crafting monitor
* @param currentToolTip unmodified tooltip
* @param accessor information wrapper
* @param config config option
* @param accessor information wrapper
* @param config config option
*
* @return modified tooltip
*/
@@ -44,10 +44,10 @@ public final class PowerStateWailaDataProvider extends BaseWailaDataProvider
/**
* Adds state to the tooltip
*
* @param itemStack stack of power state
* @param itemStack stack of power state
* @param currentToolTip to be added to tooltip
* @param accessor wrapper for various information
* @param config config settings
* @param accessor wrapper for various information
* @param config config settings
*
* @return modified tooltip
*/
@@ -56,8 +56,8 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
/**
* Used cache for power if the power was not transmitted through the server.
* <p/>
* This is useful, when a player just started to look at a tile
* and thus just requested the new information from the server.
* This is useful, when a player just started to look at a tile and thus just requested the new information from the
* server.
* <p/>
* The cache will be updated from the server.
*/
@@ -67,18 +67,18 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
* Adds the current and max power to the tool tip
* Will ignore if the tile has an energy buffer ( &gt; 0 )
*
* @param itemStack stack of power storage
* @param itemStack stack of power storage
* @param currentToolTip current tool tip
* @param accessor wrapper for various world information
* @param config config to react to various settings
* @param accessor wrapper for various world information
* @param config config to react to various settings
*
* @return modified tool tip
*/
@Override
public List<String> getWailaBody( ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
{
//Removes RF tooltip on WAILA 1.5.9+
((ITaggedList<String, String>) currentToolTip).removeEntries("RFEnergyStorage");
// Removes RF tooltip on WAILA 1.5.9+
( (ITaggedList<String, String>) currentToolTip ).removeEntries( "RFEnergyStorage" );
final TileEntity te = accessor.getTileEntity();
if( te instanceof IAEPowerStorage )
@@ -106,17 +106,16 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
/**
* Called on server to transfer information from server to client.
* <p/>
* If the {@link net.minecraft.tileentity.TileEntity} is a {@link appeng.api.networking.energy.IAEPowerStorage},
* it writes the power information to the {@code #tag}
* using the {@code #ID_CURRENT_POWER} key.
* If the {@link net.minecraft.tileentity.TileEntity} is a {@link appeng.api.networking.energy.IAEPowerStorage}, it
* writes the power information to the {@code #tag} using the {@code #ID_CURRENT_POWER} key.
*
* @param player player looking at the power storage
* @param te power storage
* @param tag transferred tag which is send to the client
* @param world world of the power storage
* @param x x pos of the power storage
* @param y y pos of the power storage
* @param z z pos of the power storage
* @param te power storage
* @param tag transferred tag which is send to the client
* @param world world of the power storage
* @param x x pos of the power storage
* @param y y pos of the power storage
* @param z z pos of the power storage
*
* @return tag send to the client
*/
@@ -141,11 +140,10 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
/**
* Determines the current power.
* <p/>
* If the client received power information on the server, they are used,
* else if the cache contains a previous stored value, this will be used.
* Default value is 0.
* If the client received power information on the server, they are used, else if the cache contains a previous
* stored value, this will be used. Default value is 0.
*
* @param te te to be looked at
* @param te te to be looked at
* @param tag tag maybe containing the channel information
*
* @return used channels on the cable