From defaddecec92b1027a0efd42461b5d95016d3031 Mon Sep 17 00:00:00 2001 From: cpw Date: Sun, 5 Apr 2015 16:13:17 -0400 Subject: [PATCH] Fix formatting --- .../minecraftforge/fluids/BlockFluidBase.java | 56 +++++++++---------- .../java/net/minecraftforge/fluids/Fluid.java | 12 ++-- .../fluids/FluidContainerRegistry.java | 32 +++++------ .../minecraftforge/fluids/FluidRegistry.java | 6 +- .../net/minecraftforge/fluids/FluidStack.java | 4 +- 5 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java b/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java index 2bda1e32b3..7e36157b23 100644 --- a/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java +++ b/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java @@ -42,7 +42,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock protected float quantaPerBlockFloat = 8F; protected int density = 1; protected int densityDir = -1; - protected int temperature = 300; + protected int temperature = 300; protected int tickRate = 20; protected int renderPass = 1; @@ -135,18 +135,18 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock } int density = getDensity(world, x, y, z); - if (density == Integer.MAX_VALUE) + if (density == Integer.MAX_VALUE) { - return true; + return true; } - + if (this.density > density) { - return true; + return true; } else { - return false; + return false; } } @@ -183,19 +183,19 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock } int density = getDensity(world, x, y, z); - if (density == Integer.MAX_VALUE) + if (density == Integer.MAX_VALUE) { - block.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0); - return true; + block.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0); + return true; } - + if (this.density > density) { - return true; + return true; } else { - return false; + return false; } } @@ -231,7 +231,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock { return canDisplace(world, x, y, z); } - + @Override public boolean getBlocksMovement(IBlockAccess world, int x, int y, int z) { @@ -309,7 +309,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock float lightUp = world.getLightBrightness(x, y + 1, z); return lightThis > lightUp ? lightThis : lightUp; } - */ + */ @Override public int getMixedBrightnessForBlock(IBlockAccess world, int x, int y, int z) @@ -321,7 +321,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock int lightThisExt = lightThis >> 16 & 255; int lightUpExt = lightUp >> 16 & 255; return (lightThisBase > lightUpBase ? lightThisBase : lightUpBase) | - ((lightThisExt > lightUpExt ? lightThisExt : lightUpExt) << 16); + ((lightThisExt > lightUpExt ? lightThisExt : lightUpExt) << 16); } @Override @@ -351,7 +351,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock } return ((BlockFluidBase)block).density; } - + public static final int getTemperature(IBlockAccess world, int x, int y, int z) { Block block = world.getBlock(x, y, z); @@ -411,10 +411,10 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock switch (side) { - case 0: --x2; break; - case 1: --z2; break; - case 2: ++x2; break; - case 3: ++z2; break; + case 0: --x2; break; + case 1: --z2; break; + case 2: ++x2; break; + case 3: ++z2; break; } int otherDecay = quantaPerBlock - getQuantaValue(world, x2, y, z2); @@ -440,14 +440,14 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock if (world.getBlock(x, y + 1, z) == this) { boolean flag = - isBlockSolid(world, x, y, z - 1, 2) || - isBlockSolid(world, x, y, z + 1, 3) || - isBlockSolid(world, x - 1, y, z, 4) || - isBlockSolid(world, x + 1, y, z, 5) || - isBlockSolid(world, x, y + 1, z - 1, 2) || - isBlockSolid(world, x, y + 1, z + 1, 3) || - isBlockSolid(world, x - 1, y + 1, z, 4) || - isBlockSolid(world, x + 1, y + 1, z, 5); + isBlockSolid(world, x, y, z - 1, 2) || + isBlockSolid(world, x, y, z + 1, 3) || + isBlockSolid(world, x - 1, y, z, 4) || + isBlockSolid(world, x + 1, y, z, 5) || + isBlockSolid(world, x, y + 1, z - 1, 2) || + isBlockSolid(world, x, y + 1, z + 1, 3) || + isBlockSolid(world, x - 1, y + 1, z, 4) || + isBlockSolid(world, x + 1, y + 1, z, 5); if (flag) { diff --git a/src/main/java/net/minecraftforge/fluids/Fluid.java b/src/main/java/net/minecraftforge/fluids/Fluid.java index 548e82e1ea..28096dda89 100644 --- a/src/main/java/net/minecraftforge/fluids/Fluid.java +++ b/src/main/java/net/minecraftforge/fluids/Fluid.java @@ -33,7 +33,7 @@ import net.minecraft.item.EnumRarity; * */ public class Fluid -{ +{ /** The unique identification name for this fluid. */ protected final String fluidName; @@ -62,7 +62,7 @@ public class Fluid /** * Temperature of the fluid - completely arbitrary; higher temperature indicates that the fluid is * hotter than air. - * + * * Default value is approximately the real-life room temperature of water in degrees Kelvin. */ protected int temperature = 300; @@ -72,10 +72,10 @@ public class Fluid * permissible. * * Default value is approximately the real-life density of water in m/s^2 (x10^-3). - * + * * Higher viscosity means that a fluid flows more slowly, like molasses. * Lower viscosity means that a fluid flows more quickly, like helium. - * + * */ protected int viscosity = 1000; @@ -198,7 +198,7 @@ public class Fluid { return getLocalizedName(); } - + /** * Use the FluidStack sensitive version above */ @@ -258,7 +258,7 @@ public class Fluid { return this.isGaseous; } - + public EnumRarity getRarity() { return rarity; diff --git a/src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java b/src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java index 5ff13369e2..33c47f24e7 100644 --- a/src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java +++ b/src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java @@ -20,16 +20,16 @@ import net.minecraftforge.common.MinecraftForge; /** * Register simple items that contain fluids here. Useful for buckets, bottles, and things that have * ID/metadata mappings. - * + * * For more complex items, use {@link IFluidContainerItem} instead. - * + * * @author King Lemming - * + * */ public abstract class FluidContainerRegistry { - // Holder object that implements HashCode for an ItemStack, - // the local maps are not guaranteed to have the same internal generic structure, + // Holder object that implements HashCode for an ItemStack, + // the local maps are not guaranteed to have the same internal generic structure, // but the external interface for checking ItemStacks will still exist. private static class ContainerKey { @@ -89,7 +89,7 @@ public abstract class FluidContainerRegistry /** * Register a new fluid containing item. - * + * * @param stack * FluidStack containing the type and amount of the fluid stored in the item. * @param filledContainer @@ -106,7 +106,7 @@ public abstract class FluidContainerRegistry /** * Register a new fluid containing item. The item is assumed to hold 1000 mB of fluid. Also * registers the Fluid if possible. - * + * * @param fluid * Fluid type that is stored in the item. * @param filledContainer @@ -126,7 +126,7 @@ public abstract class FluidContainerRegistry /** * Register a new fluid containing item that does not have an empty container. - * + * * @param stack * FluidStack containing the type and amount of the fluid stored in the item. * @param filledContainer @@ -141,7 +141,7 @@ public abstract class FluidContainerRegistry /** * Register a new fluid containing item that does not have an empty container. The item is * assumed to hold 1000 mB of fluid. Also registers the Fluid if possible. - * + * * @param fluid * Fluid type that is stored in the item. * @param filledContainer @@ -159,7 +159,7 @@ public abstract class FluidContainerRegistry /** * Register a new fluid containing item. - * + * * @param data * See {@link FluidContainerData}. * @return True if container was successfully registered; false if it already is. @@ -184,7 +184,7 @@ public abstract class FluidContainerRegistry /** * Determines the fluid type and amount inside a container. - * + * * @param container * The fluid container. * @return FluidStack representing stored fluid. @@ -202,9 +202,9 @@ public abstract class FluidContainerRegistry /** * Attempts to fill an empty container with a fluid. - * + * * NOTE: Returns null on fail, NOT the empty container. - * + * * @param fluid * FluidStack containing the type and amount of fluid to fill. * @param container @@ -228,7 +228,7 @@ public abstract class FluidContainerRegistry /** * Attempts to empty a full container. - * + * * @param container * ItemStack representing the full container. * @return Empty container if successful, otherwise null. @@ -251,7 +251,7 @@ public abstract class FluidContainerRegistry /** * Determines the capacity of a full container. - * + * * @param container * The full container. * @return The containers capacity, or 0 if the ItemStack does not represent @@ -264,7 +264,7 @@ public abstract class FluidContainerRegistry /** * Determines the capacity of a container. - * + * * @param fluid * FluidStack containing the type of fluid the capacity should be * determined for (ignored for full containers). diff --git a/src/main/java/net/minecraftforge/fluids/FluidRegistry.java b/src/main/java/net/minecraftforge/fluids/FluidRegistry.java index 89476afe77..bff900767b 100644 --- a/src/main/java/net/minecraftforge/fluids/FluidRegistry.java +++ b/src/main/java/net/minecraftforge/fluids/FluidRegistry.java @@ -28,14 +28,14 @@ public abstract class FluidRegistry static BiMap fluids = HashBiMap.create(); static BiMap fluidIDs = HashBiMap.create(); static BiMap fluidBlocks; - + public static final Fluid WATER = new Fluid("water") { @Override public String getLocalizedName() { return StatCollector.translateToLocal("tile.water.name"); } }.setBlock(Blocks.water).setUnlocalizedName(Blocks.water.getUnlocalizedName()); - + public static final Fluid LAVA = new Fluid("lava") { @Override public String getLocalizedName() { @@ -165,7 +165,7 @@ public abstract class FluidRegistry } return fluidBlocks.get(block); } - + public static class FluidRegisterEvent extends Event { public final String fluidName; diff --git a/src/main/java/net/minecraftforge/fluids/FluidStack.java b/src/main/java/net/minecraftforge/fluids/FluidStack.java index f23bb0b9eb..16e3868632 100644 --- a/src/main/java/net/minecraftforge/fluids/FluidStack.java +++ b/src/main/java/net/minecraftforge/fluids/FluidStack.java @@ -56,7 +56,7 @@ public class FluidStack { this(FluidRegistry.getFluid(fluidID), amount, nbt); } - + /** * This provides a safe method for retrieving a FluidStack - if the Fluid is invalid, the stack * will return as null. @@ -103,7 +103,7 @@ public class FluidStack { return FluidRegistry.getFluidID(fluid); } - + public String getLocalizedName() { return this.getFluid().getLocalizedName(this);