diff --git a/src/main/scala/mrtjp/mcframes/api/IFrame.java b/src/main/scala/mrtjp/mcframes/api/IFrame.java index 5ac17db..210a40a 100644 --- a/src/main/scala/mrtjp/mcframes/api/IFrame.java +++ b/src/main/scala/mrtjp/mcframes/api/IFrame.java @@ -14,8 +14,7 @@ import net.minecraft.world.World; * moving structure when moved through the {@link Relocator}. No other action besides * implementation of this interface is needed for the block to function. */ -public interface IFrame -{ +public interface IFrame { /** * Used to check if this frame block is allowed to grab * a block on the given side. @@ -47,4 +46,4 @@ public interface IFrame * @return True if the side can be grabbed by a frame block. */ boolean stickIn(World w, int x, int y, int z, int side); -} \ No newline at end of file +} diff --git a/src/main/scala/mrtjp/mcframes/api/IFrameInteraction.java b/src/main/scala/mrtjp/mcframes/api/IFrameInteraction.java index 9e161bf..79254d1 100644 --- a/src/main/scala/mrtjp/mcframes/api/IFrameInteraction.java +++ b/src/main/scala/mrtjp/mcframes/api/IFrameInteraction.java @@ -14,8 +14,7 @@ import net.minecraft.world.World; * implement the IFrame interface. This class must be registered in * the {@link RelocationAPI}. */ -public interface IFrameInteraction extends IFrame -{ +public interface IFrameInteraction extends IFrame { /** * Check to see if this interaction can be executed at the given * coordinates. @@ -28,4 +27,4 @@ public interface IFrameInteraction extends IFrame * location. */ boolean canInteract(World w, int x, int y, int z); -} \ No newline at end of file +} diff --git a/src/main/scala/mrtjp/mcframes/api/IFramePlacement.java b/src/main/scala/mrtjp/mcframes/api/IFramePlacement.java index a1f00d5..63ea59e 100644 --- a/src/main/scala/mrtjp/mcframes/api/IFramePlacement.java +++ b/src/main/scala/mrtjp/mcframes/api/IFramePlacement.java @@ -17,8 +17,7 @@ import net.minecraft.world.World; * placement. This class can be registered through the * {@link RelocationAPI}. */ -public interface IFramePlacement -{ +public interface IFramePlacement { /** * Called sequentially on all registered IFrameBlockPlacements on * the frame item block's onItemUse function, until one returns true. @@ -32,5 +31,6 @@ public interface IFramePlacement * @param hit The exact hit position of the click. * @return True if something happened. This will subsequently block the actual placement of the block. */ - public boolean onItemUse(ItemStack item, EntityPlayer player, World world, int x, int y, int z, int side, Vector3 hit); -} \ No newline at end of file + public boolean onItemUse( + ItemStack item, EntityPlayer player, World world, int x, int y, int z, int side, Vector3 hit); +} diff --git a/src/main/scala/mrtjp/mcframes/api/MCFramesAPI.java b/src/main/scala/mrtjp/mcframes/api/MCFramesAPI.java index b0abcf2..6ebcc18 100644 --- a/src/main/scala/mrtjp/mcframes/api/MCFramesAPI.java +++ b/src/main/scala/mrtjp/mcframes/api/MCFramesAPI.java @@ -14,8 +14,7 @@ import net.minecraft.util.Vec3; *

* It is recommended that mods access this class within a soft dependency class. */ -public abstract class MCFramesAPI -{ +public abstract class MCFramesAPI { /** * This field will contain an implementor of this API if Relocation is installed. */ @@ -80,4 +79,4 @@ public abstract class MCFramesAPI * @return The object position if anything from the frame model was hit. */ public abstract MovingObjectPosition raytraceFrame(double x, double y, double z, int mask, Vec3 start, Vec3 end); -} \ No newline at end of file +} diff --git a/src/main/scala/mrtjp/mcframes/api/StickResolver.java b/src/main/scala/mrtjp/mcframes/api/StickResolver.java index 00ec3a6..7bff070 100644 --- a/src/main/scala/mrtjp/mcframes/api/StickResolver.java +++ b/src/main/scala/mrtjp/mcframes/api/StickResolver.java @@ -5,16 +5,14 @@ */ package mrtjp.mcframes.api; +import java.util.Set; import mrtjp.relocation.api.BlockPos; import net.minecraft.world.World; -import java.util.Set; - /** * Helper class used to resolve frame structures. */ -public abstract class StickResolver -{ +public abstract class StickResolver { /** * Method used to obtain the block coordinates of every block that is part of the same * framed structure as the one that was given as an argument. @@ -28,4 +26,4 @@ public abstract class StickResolver * @return A set of all block coordinates that are part of the structure that the input block was in. */ public abstract Set getStructure(World world, int x, int y, int z, BlockPos... exclusions); -} \ No newline at end of file +} diff --git a/src/main/scala/mrtjp/mcframes/api/package-info.java b/src/main/scala/mrtjp/mcframes/api/package-info.java index 025ac27..159f355 100644 --- a/src/main/scala/mrtjp/mcframes/api/package-info.java +++ b/src/main/scala/mrtjp/mcframes/api/package-info.java @@ -4,7 +4,5 @@ * All rights reserved. */ -//@API(owner = "MCFrames", provides = "MCFrames|API", apiVersion = "GRADLETOKEN_VERSION") +// @API(owner = "MCFrames", provides = "MCFrames|API", apiVersion = "GRADLETOKEN_VERSION") package mrtjp.mcframes.api; - -import cpw.mods.fml.common.API; diff --git a/src/main/scala/mrtjp/relocation/api/BlockPos.java b/src/main/scala/mrtjp/relocation/api/BlockPos.java index 622112f..929e24c 100644 --- a/src/main/scala/mrtjp/relocation/api/BlockPos.java +++ b/src/main/scala/mrtjp/relocation/api/BlockPos.java @@ -9,31 +9,26 @@ package mrtjp.relocation.api; * Lightweight block position object used to keep dependencies confined * to the api package, used by some of the API's methods. */ -public class BlockPos -{ +public class BlockPos { public int x; public int y; public int z; - public BlockPos(int x, int y, int z) - { + public BlockPos(int x, int y, int z) { this.x = x; this.y = y; this.z = z; } - public boolean equals(Object obj) - { - if(!(obj instanceof BlockPos)) return false; - else - { + public boolean equals(Object obj) { + if (!(obj instanceof BlockPos)) return false; + else { BlockPos o2 = (BlockPos) obj; return this.x == o2.x && this.y == o2.y && this.z == o2.z; } } - public int hashCode() - { - return (this.x^this.z)*31+this.y; + public int hashCode() { + return (this.x ^ this.z) * 31 + this.y; } -} \ No newline at end of file +} diff --git a/src/main/scala/mrtjp/relocation/api/IMovementCallback.java b/src/main/scala/mrtjp/relocation/api/IMovementCallback.java index f53bd77..ed27377 100644 --- a/src/main/scala/mrtjp/relocation/api/IMovementCallback.java +++ b/src/main/scala/mrtjp/relocation/api/IMovementCallback.java @@ -19,8 +19,7 @@ package mrtjp.relocation.api; * can only happen server-side. * */ -public interface IMovementCallback -{ +public interface IMovementCallback { /** * Called once move starts. The descriptor contains methods that * describe the state of the current movement that this callback @@ -42,4 +41,4 @@ public interface IMovementCallback * Called when the movement completes, and all blocks have moved over. */ void onMovementFinished(); -} \ No newline at end of file +} diff --git a/src/main/scala/mrtjp/relocation/api/IMovementDescriptor.java b/src/main/scala/mrtjp/relocation/api/IMovementDescriptor.java index 134af8a..79a751c 100644 --- a/src/main/scala/mrtjp/relocation/api/IMovementDescriptor.java +++ b/src/main/scala/mrtjp/relocation/api/IMovementDescriptor.java @@ -12,8 +12,7 @@ package mrtjp.relocation.api; * Results of all methods is only valid during movement, undefined otherwise. Use * isMoving() to check before using any values from this. */ -public interface IMovementDescriptor -{ +public interface IMovementDescriptor { /** * @return True if the structure is moving. */ @@ -28,4 +27,4 @@ public interface IMovementDescriptor * @return The size of the moving structure, zero if it is no longer moving. */ int getSize(); -} \ No newline at end of file +} diff --git a/src/main/scala/mrtjp/relocation/api/ITileMover.java b/src/main/scala/mrtjp/relocation/api/ITileMover.java index 0ceb1d6..728bb43 100644 --- a/src/main/scala/mrtjp/relocation/api/ITileMover.java +++ b/src/main/scala/mrtjp/relocation/api/ITileMover.java @@ -11,8 +11,7 @@ import net.minecraft.world.World; * Interface for an object that manages the movement of blocks and tiles that are * registered to it. This class should be registered through the {@link RelocationAPI}. */ -public interface ITileMover -{ +public interface ITileMover { /** * Used to check if the block at the given position can move. This * method is only called if the specified block is tied to this @@ -60,4 +59,4 @@ public interface ITileMover * @param z The z coordinate. */ void postMove(World w, int x, int y, int z); -} \ No newline at end of file +} diff --git a/src/main/scala/mrtjp/relocation/api/RelocationAPI.java b/src/main/scala/mrtjp/relocation/api/RelocationAPI.java index e724738..2f2a62b 100644 --- a/src/main/scala/mrtjp/relocation/api/RelocationAPI.java +++ b/src/main/scala/mrtjp/relocation/api/RelocationAPI.java @@ -14,8 +14,7 @@ import net.minecraft.world.World; *

* It is recommended that mods access this class within a soft dependency class. */ -public abstract class RelocationAPI -{ +public abstract class RelocationAPI { /** * This field will contain an implementor of this API if Relocation is installed. */ @@ -90,4 +89,4 @@ public abstract class RelocationAPI * @return True if the block is currently moving. */ public abstract boolean isMoving(World world, int x, int y, int z); -} \ No newline at end of file +} diff --git a/src/main/scala/mrtjp/relocation/api/Relocator.java b/src/main/scala/mrtjp/relocation/api/Relocator.java index d8c7126..9ec2126 100644 --- a/src/main/scala/mrtjp/relocation/api/Relocator.java +++ b/src/main/scala/mrtjp/relocation/api/Relocator.java @@ -5,16 +5,14 @@ */ package mrtjp.relocation.api; -import net.minecraft.world.World; - import java.util.Set; +import net.minecraft.world.World; /** * Helper class used to queue and execute the movement of a set of blocks. * See {@link mrtjp.mcframes.TileMotor} for usage. */ -public abstract class Relocator -{ +public abstract class Relocator { /** * Pushes an instance of the Relocator onto the stack. * Must be called before using any methods. @@ -76,7 +74,9 @@ public abstract class Relocator * @throws IllegalStateException If the Relocator is not on the stack. */ public abstract void addBlock(int x, int y, int z); + public abstract void addBlock(BlockPos bc); + public abstract void addBlocks(Set blocks); /** @@ -90,4 +90,4 @@ public abstract class Relocator * or are invalid. */ public abstract boolean execute(); -} \ No newline at end of file +}