diff --git a/src/main/java/cofh/api/CoFHAPIProps.java b/src/main/java/cofh/api/CoFHAPIProps.java index 775d8d22..06b5b183 100644 --- a/src/main/java/cofh/api/CoFHAPIProps.java +++ b/src/main/java/cofh/api/CoFHAPIProps.java @@ -6,6 +6,6 @@ public class CoFHAPIProps { } - public static final String VERSION = "1.7.10R1.0.3"; + public static final String VERSION = "1.7.10R1.0.12"; } diff --git a/src/main/java/cofh/api/block/IBlockAppearance.java b/src/main/java/cofh/api/block/IBlockAppearance.java new file mode 100644 index 00000000..558d348e --- /dev/null +++ b/src/main/java/cofh/api/block/IBlockAppearance.java @@ -0,0 +1,51 @@ +package cofh.api.block; + +import net.minecraft.block.Block; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; + +/** + * Implement this interface on blocks that can mimic the appearance of other blocks. Note that this is meant to be available server-side, so ensure the code is + * server-safe and doesn't use client-side code. + * + */ +public interface IBlockAppearance { + + /** + * This function returns the block that is being shown on a given side. + * + * @param world + * Reference to the world. + * @param x + * X coordinate of the block. + * @param y + * Y coordinate of the block. + * @param z + * Z coordinate of the block. + * @param side + * The side of the block. + */ + public Block getVisualBlock(IBlockAccess world, int x, int y, int z, ForgeDirection side); + + /** + * This function returns metadata of the block that is being shown on a given side. + * + * @param world + * Reference to the world. + * @param x + * X coordinate of the block. + * @param y + * Y coordinate of the block. + * @param z + * Z coordinate of the block. + * @param side + * The side of the block. + */ + public int getVisualMeta(IBlockAccess world, int x, int y, int z, ForgeDirection side); + + /** + * This function returns whether the block's renderer will visually connect to other blocks implementing IBlockAppearance. + */ + public boolean supportsVisualConnections(); + +} diff --git a/src/main/java/cofh/api/block/IBlockConfigGui.java b/src/main/java/cofh/api/block/IBlockConfigGui.java new file mode 100644 index 00000000..9e00c87d --- /dev/null +++ b/src/main/java/cofh/api/block/IBlockConfigGui.java @@ -0,0 +1,31 @@ +package cofh.api.block; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; + +/** + * Implement this interface on blocks which have a GUI that needs a tool (e.g., multimeter) to open. + * + */ +public interface IBlockConfigGui { + + /** + * This function will open a GUI if the player has permission. + * + * @param world + * Reference to the world. + * @param x + * X coordinate of the block. + * @param y + * Y coordinate of the block. + * @param z + * Z coordinate of the block. + * @param side + * The side of the block. + * @param player + * Player doing the configuring. + * @return True if the GUI was opened. + */ + public boolean openConfigGui(IBlockAccess world, int x, int y, int z, ForgeDirection side, EntityPlayer player); +} diff --git a/src/main/java/cofh/api/block/IBlockDebug.java b/src/main/java/cofh/api/block/IBlockDebug.java index 091831c9..dc02f7f7 100644 --- a/src/main/java/cofh/api/block/IBlockDebug.java +++ b/src/main/java/cofh/api/block/IBlockDebug.java @@ -6,15 +6,15 @@ import net.minecraftforge.common.util.ForgeDirection; /** * Implement this interface on blocks which have some debug method which can be activated via a tool or other means. - * + * * @author King Lemming - * + * */ public interface IBlockDebug { /** * This function debugs a block. - * + * * @param world * Reference to the world. * @param x diff --git a/src/main/java/cofh/api/block/IBlockInfo.java b/src/main/java/cofh/api/block/IBlockInfo.java index 12d96f0b..8494243c 100644 --- a/src/main/java/cofh/api/block/IBlockInfo.java +++ b/src/main/java/cofh/api/block/IBlockInfo.java @@ -12,15 +12,15 @@ import net.minecraftforge.common.util.ForgeDirection; /** * Implement this interface on blocks which can provide information about themselves. If the block contains Tile Entities, then it is recommended that this * function serve as a passthrough for {@link ITileInfo}. - * + * * @author King Lemming - * + * */ public interface IBlockInfo { /** * This function appends information to a list provided to it. - * + * * @param world * Reference to the world. * @param x diff --git a/src/main/java/cofh/api/block/IDismantleable.java b/src/main/java/cofh/api/block/IDismantleable.java index 0e530a65..12c09e3a 100644 --- a/src/main/java/cofh/api/block/IDismantleable.java +++ b/src/main/java/cofh/api/block/IDismantleable.java @@ -8,9 +8,9 @@ import net.minecraft.world.World; /** * Implemented on Blocks which have some method of being instantly dismantled. - * + * * @author King Lemming - * + * */ public interface IDismantleable { diff --git a/src/main/java/cofh/api/energy/EnergyStorage.java b/src/main/java/cofh/api/energy/EnergyStorage.java index 1674c189..25e0126a 100644 --- a/src/main/java/cofh/api/energy/EnergyStorage.java +++ b/src/main/java/cofh/api/energy/EnergyStorage.java @@ -4,9 +4,9 @@ import net.minecraft.nbt.NBTTagCompound; /** * Reference implementation of {@link IEnergyStorage}. Use/extend this or implement your own. - * + * * @author King Lemming - * + * */ public class EnergyStorage implements IEnergyStorage { @@ -89,7 +89,7 @@ public class EnergyStorage implements IEnergyStorage { /** * This function is included to allow for server -> client sync. Do not call this externally to the containing Tile Entity, as not all IEnergyHandlers * are guaranteed to have it. - * + * * @param energy */ public void setEnergyStored(int energy) { @@ -106,7 +106,7 @@ public class EnergyStorage implements IEnergyStorage { /** * This function is included to allow the containing tile to directly and efficiently modify the energy contained in the EnergyStorage. Do not rely on this * externally, as not all IEnergyHandlers are guaranteed to have it. - * + * * @param energy */ public void modifyEnergyStored(int energy) { diff --git a/src/main/java/cofh/api/energy/IEnergyConnection.java b/src/main/java/cofh/api/energy/IEnergyConnection.java index 79bdf77a..301271e5 100644 --- a/src/main/java/cofh/api/energy/IEnergyConnection.java +++ b/src/main/java/cofh/api/energy/IEnergyConnection.java @@ -7,9 +7,9 @@ import net.minecraftforge.common.util.ForgeDirection; * accept it; otherwise just use IEnergyHandler. *
* Note that {@link IEnergyHandler} is an extension of this. - * + * * @author King Lemming - * + * */ public interface IEnergyConnection { diff --git a/src/main/java/cofh/api/energy/IEnergyContainerItem.java b/src/main/java/cofh/api/energy/IEnergyContainerItem.java index c28455b1..3ef72576 100644 --- a/src/main/java/cofh/api/energy/IEnergyContainerItem.java +++ b/src/main/java/cofh/api/energy/IEnergyContainerItem.java @@ -6,15 +6,15 @@ import net.minecraft.item.ItemStack; * Implement this interface on Item classes that support external manipulation of their internal energy storages. *
* A reference implementation is provided {@link ItemEnergyContainer}. - * + * * @author King Lemming - * + * */ public interface IEnergyContainerItem { /** * Adds energy to a container item. Returns the quantity of energy that was accepted. This should always return 0 if the item cannot be externally charged. - * + * * @param container * ItemStack to be charged. * @param maxReceive @@ -28,7 +28,7 @@ public interface IEnergyContainerItem { /** * Removes energy from a container item. Returns the quantity of energy that was removed. This should always return 0 if the item cannot be externally * discharged. - * + * * @param container * ItemStack to be discharged. * @param maxExtract diff --git a/src/main/java/cofh/api/energy/IEnergyHandler.java b/src/main/java/cofh/api/energy/IEnergyHandler.java index 22f2dbc6..6a4600a4 100644 --- a/src/main/java/cofh/api/energy/IEnergyHandler.java +++ b/src/main/java/cofh/api/energy/IEnergyHandler.java @@ -42,7 +42,6 @@ public interface IEnergyHandler extends IEnergyProvider, IEnergyReceiver { @Override int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate); - /** * Returns the amount of energy currently stored. */ diff --git a/src/main/java/cofh/api/energy/IEnergyStorage.java b/src/main/java/cofh/api/energy/IEnergyStorage.java index bc206560..414b2656 100644 --- a/src/main/java/cofh/api/energy/IEnergyStorage.java +++ b/src/main/java/cofh/api/energy/IEnergyStorage.java @@ -5,15 +5,15 @@ package cofh.api.energy; * This is not to be implemented on TileEntities. This is for internal use only. *
* A reference implementation can be found at {@link EnergyStorage}.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IEnergyStorage {
/**
* Adds energy to the storage. Returns quantity of energy that was accepted.
- *
+ *
* @param maxReceive
* Maximum amount of energy to be inserted.
* @param simulate
@@ -24,7 +24,7 @@ public interface IEnergyStorage {
/**
* Removes energy from the storage. Returns quantity of energy that was removed.
- *
+ *
* @param maxExtract
* Maximum amount of energy to be extracted.
* @param simulate
diff --git a/src/main/java/cofh/api/energy/ItemEnergyContainer.java b/src/main/java/cofh/api/energy/ItemEnergyContainer.java
index 055ae45b..2d3659cb 100644
--- a/src/main/java/cofh/api/energy/ItemEnergyContainer.java
+++ b/src/main/java/cofh/api/energy/ItemEnergyContainer.java
@@ -6,9 +6,9 @@ import net.minecraft.nbt.NBTTagCompound;
/**
* Reference implementation of {@link IEnergyContainerItem}. Use/extend this or implement your own.
- *
+ *
* @author King Lemming
- *
+ *
*/
public class ItemEnergyContainer extends Item implements IEnergyContainerItem {
diff --git a/src/main/java/cofh/api/inventory/IInventoryHandler.java b/src/main/java/cofh/api/inventory/IInventoryHandler.java
index 4cb753c9..344e8153 100644
--- a/src/main/java/cofh/api/inventory/IInventoryHandler.java
+++ b/src/main/java/cofh/api/inventory/IInventoryHandler.java
@@ -7,18 +7,18 @@ import net.minecraftforge.common.util.ForgeDirection;
/**
* Implement this interface on TileEntities which should handle items.
- *
+ *
* A reference implementation is provided {@link TileInventoryHandler}.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IInventoryHandler extends IInventoryConnection {
/**
* Insert an ItemStack into the IInventoryHandler, internal distribution is left entirely to the IInventoryHandler. This returns what is remaining of the
* original stack - a null return means that the entire stack was accepted!
- *
+ *
* @param from
* Orientation the item is inserted from.
* @param item
@@ -32,7 +32,7 @@ public interface IInventoryHandler extends IInventoryConnection {
/**
* Extract an ItemStack from an IInventoryHandler, internal distribution is left entirely to the IInventoryHandler. This returns the resulting stack - a
* null return means that nothing was extracted!
- *
+ *
* @param from
* Orientation the item is extracted from.
* @param item
@@ -47,7 +47,7 @@ public interface IInventoryHandler extends IInventoryConnection {
/**
* Extract an ItemStack from an IInventoryHandler, internal distribution is left entirely to the IInventoryHandler. This returns the resulting stack - a
* null return means that nothing was extracted!
- *
+ *
* @param from
* Orientation the item is extracted from.
* @param maxExtract
diff --git a/src/main/java/cofh/api/inventory/IInventoryRetainer.java b/src/main/java/cofh/api/inventory/IInventoryRetainer.java
index 30309fb2..df79681e 100644
--- a/src/main/java/cofh/api/inventory/IInventoryRetainer.java
+++ b/src/main/java/cofh/api/inventory/IInventoryRetainer.java
@@ -2,9 +2,9 @@ package cofh.api.inventory;
/**
* Marks a block which will retain its inventory when broken.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IInventoryRetainer {
diff --git a/src/main/java/cofh/api/item/IAugmentItem.java b/src/main/java/cofh/api/item/IAugmentItem.java
index 497bace9..e17fa8de 100644
--- a/src/main/java/cofh/api/item/IAugmentItem.java
+++ b/src/main/java/cofh/api/item/IAugmentItem.java
@@ -8,7 +8,7 @@ public interface IAugmentItem {
/**
* Get the augmentation level for a given Augment and Augment Type.
- *
+ *
* @param stack
* ItemStack representing the Augment.
* @param type
@@ -19,7 +19,7 @@ public interface IAugmentItem {
/**
* Get the Augment Types for a given Augment. Set ensure that there are no duplicates.
- *
+ *
* @param stack
* ItemStack representing the Augment.
* @return Set of the Augmentation Types. Should return an empty set if there are none (but this would be really stupid to make). DO NOT RETURN NULL.
diff --git a/src/main/java/cofh/api/item/IEmpowerableItem.java b/src/main/java/cofh/api/item/IEmpowerableItem.java
index f77c71f6..42877110 100644
--- a/src/main/java/cofh/api/item/IEmpowerableItem.java
+++ b/src/main/java/cofh/api/item/IEmpowerableItem.java
@@ -6,9 +6,9 @@ import net.minecraft.item.ItemStack;
/**
* Implement this interface on Item classes which may be "Empowered" - what that means is completely up to you. This just provides a uniform way of dealing with
* them.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IEmpowerableItem {
@@ -19,7 +19,7 @@ public interface IEmpowerableItem {
/**
* Attempt to set the empowered state of the item.
- *
+ *
* @param stack
* ItemStack to be empowered/disempowered.
* @param state
@@ -30,7 +30,7 @@ public interface IEmpowerableItem {
/**
* Callback method for reacting to a state change. Useful in KeyBinding handlers.
- *
+ *
* @param player
* Player holding the item, if applicable.
* @param stack
diff --git a/src/main/java/cofh/api/item/IInventoryContainerItem.java b/src/main/java/cofh/api/item/IInventoryContainerItem.java
index b87896cc..adadf10a 100644
--- a/src/main/java/cofh/api/item/IInventoryContainerItem.java
+++ b/src/main/java/cofh/api/item/IInventoryContainerItem.java
@@ -4,11 +4,11 @@ import net.minecraft.item.ItemStack;
/**
* Implement this interface on Item classes that are themselves inventories.
- *
+ *
* A reference implementation is provided {@link ItemInventoryContainer}.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IInventoryContainerItem {
diff --git a/src/main/java/cofh/api/item/IMultiModeItem.java b/src/main/java/cofh/api/item/IMultiModeItem.java
new file mode 100644
index 00000000..c236bbfb
--- /dev/null
+++ b/src/main/java/cofh/api/item/IMultiModeItem.java
@@ -0,0 +1,56 @@
+package cofh.api.item;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+
+/**
+ * Implement this interface on Item classes which may be "Empowered" - what that means is completely up to you. This just provides a uniform way of dealing with
+ * them.
+ *
+ * @author King Lemming
+ *
+ */
+public interface IMultiModeItem {
+
+ /**
+ * Get the current mode of an item.
+ */
+ int getMode(ItemStack stack);
+
+ /**
+ * Attempt to set the empowered state of the item.
+ *
+ * @param stack
+ * ItemStack to set the mode on.
+ * @param mode
+ * Desired mode.
+ * @return TRUE if the operation was successful, FALSE if it was not.
+ */
+ boolean setMode(ItemStack stack, int mode);
+
+ /**
+ * Increment the current mode of an item.
+ */
+ boolean incrMode(ItemStack stack);
+
+ /**
+ * Decrement the current mode of an item.
+ */
+ boolean decrMode(ItemStack stack);
+
+ /**
+ * Returns the number of possible modes.
+ */
+ int getNumModes(ItemStack stack);
+
+ /**
+ * Callback method for reacting to a state change. Useful in KeyBinding handlers.
+ *
+ * @param player
+ * Player holding the item, if applicable.
+ * @param stack
+ * The item being held.
+ */
+ void onModeChange(EntityPlayer player, ItemStack stack);
+
+}
diff --git a/src/main/java/cofh/api/item/IToolHammer.java b/src/main/java/cofh/api/item/IToolHammer.java
index 1ffefe72..f7b3918f 100644
--- a/src/main/java/cofh/api/item/IToolHammer.java
+++ b/src/main/java/cofh/api/item/IToolHammer.java
@@ -10,7 +10,7 @@ public interface IToolHammer {
/**
* Called to ensure that the wrench can be used.
- *
+ *
* @param item
* The itemstack for the tool. Not required to match equipped item (e.g., multi-tools that contain other tools)
* @param user
@@ -27,7 +27,7 @@ public interface IToolHammer {
/**
* Callback for when the tool has been used reactively.
- *
+ *
* @param item
* The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other tools)
* @param user
diff --git a/src/main/java/cofh/api/tileentity/IAugmentable.java b/src/main/java/cofh/api/tileentity/IAugmentable.java
index 735ade14..5a99c598 100644
--- a/src/main/java/cofh/api/tileentity/IAugmentable.java
+++ b/src/main/java/cofh/api/tileentity/IAugmentable.java
@@ -4,9 +4,9 @@ import net.minecraft.item.ItemStack;
/**
* Implemented on objects which support Augments.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IAugmentable {
diff --git a/src/main/java/cofh/api/tileentity/IEnergyInfo.java b/src/main/java/cofh/api/tileentity/IEnergyInfo.java
index 72d553b3..6277a34c 100644
--- a/src/main/java/cofh/api/tileentity/IEnergyInfo.java
+++ b/src/main/java/cofh/api/tileentity/IEnergyInfo.java
@@ -2,11 +2,11 @@ package cofh.api.tileentity;
/**
* Implement this interface on objects which can report information about their energy usage.
- *
+ *
* This is used for reporting purposes - Energy transactions are handled through IEnergyHandler!
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IEnergyInfo {
diff --git a/src/main/java/cofh/api/tileentity/IPlacedTile.java b/src/main/java/cofh/api/tileentity/IPlacedTile.java
deleted file mode 100644
index df54a969..00000000
--- a/src/main/java/cofh/api/tileentity/IPlacedTile.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package cofh.api.tileentity;
-
-/**
- * Implement this interface on Tile Entities which need to know when they are placed into the world.
- *
- * @author Zeldo
- *
- */
-public interface IPlacedTile {
-
- public void tilePlaced();
-
-}
diff --git a/src/main/java/cofh/api/tileentity/IPortableData.java b/src/main/java/cofh/api/tileentity/IPortableData.java
index 13134dbd..81d42964 100644
--- a/src/main/java/cofh/api/tileentity/IPortableData.java
+++ b/src/main/java/cofh/api/tileentity/IPortableData.java
@@ -5,18 +5,18 @@ import net.minecraft.nbt.NBTTagCompound;
/**
* Implement this interface on Tile Entities which can write a limited amount of data about themselves.
- *
+ *
* This is typically for the purposes of being transferred to a similar tile entity.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IPortableData {
/**
* Data identifier of the Tile Entity/Block. Used for display as well as verification purposes. Tiles with completely interchangeable data should return the
* same type.
- *
+ *
* @return
*/
String getDataType();
diff --git a/src/main/java/cofh/api/tileentity/IReconfigurableFacing.java b/src/main/java/cofh/api/tileentity/IReconfigurableFacing.java
index 40efe7c3..e6972091 100644
--- a/src/main/java/cofh/api/tileentity/IReconfigurableFacing.java
+++ b/src/main/java/cofh/api/tileentity/IReconfigurableFacing.java
@@ -2,11 +2,11 @@ package cofh.api.tileentity;
/**
* Implement this interface on Tile Entities which allow for reconfiguration of their facing.
- *
+ *
* Coordination with the containing block is required.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IReconfigurableFacing {
@@ -22,14 +22,14 @@ public interface IReconfigurableFacing {
/**
* Attempt to rotate the block. Arbitrary based on implementation.
- *
+ *
* @return True if rotation was successful, false otherwise.
*/
boolean rotateBlock();
/**
* Set the facing of the block.
- *
+ *
* @param side
* The side to set the facing to.
* @return True if the facing was set, false otherwise.
diff --git a/src/main/java/cofh/api/tileentity/IReconfigurableSides.java b/src/main/java/cofh/api/tileentity/IReconfigurableSides.java
index 79c0f5bc..e3a708dd 100644
--- a/src/main/java/cofh/api/tileentity/IReconfigurableSides.java
+++ b/src/main/java/cofh/api/tileentity/IReconfigurableSides.java
@@ -2,17 +2,17 @@ package cofh.api.tileentity;
/**
* Implement this interface on Tile Entities which allow for reconfiguration of their sides.
- *
+ *
* Coordination with the containing block is required.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IReconfigurableSides {
/**
* Decrement the config for a given side.
- *
+ *
* @param side
* The side to decrement.
* @return True if config was changed, false otherwise.
@@ -21,7 +21,7 @@ public interface IReconfigurableSides {
/**
* Increment the config for a given side.
- *
+ *
* @param side
* The side to decrement.
* @return True if config was changed, false otherwise.
@@ -30,7 +30,7 @@ public interface IReconfigurableSides {
/**
* Set the config for a given side.
- *
+ *
* @param side
* The side to set.
* @param config
@@ -41,7 +41,7 @@ public interface IReconfigurableSides {
/**
* Reset configs on all sides to their base values.
- *
+ *
* @return True if reset was successful, false otherwise.
*/
boolean resetSides();
diff --git a/src/main/java/cofh/api/tileentity/IRedstoneCache.java b/src/main/java/cofh/api/tileentity/IRedstoneCache.java
index f1254d8d..1d873e53 100644
--- a/src/main/java/cofh/api/tileentity/IRedstoneCache.java
+++ b/src/main/java/cofh/api/tileentity/IRedstoneCache.java
@@ -2,11 +2,11 @@ package cofh.api.tileentity;
/**
* Implement this interface on Tile Entities which cache their redstone status.
- *
+ *
* Note that {@link IRedstoneControl} is an extension of this.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IRedstoneCache {
diff --git a/src/main/java/cofh/api/tileentity/IRedstoneControl.java b/src/main/java/cofh/api/tileentity/IRedstoneControl.java
index 11060325..f868affb 100644
--- a/src/main/java/cofh/api/tileentity/IRedstoneControl.java
+++ b/src/main/java/cofh/api/tileentity/IRedstoneControl.java
@@ -3,9 +3,9 @@ package cofh.api.tileentity;
/**
* Implement this interface on Tile Entities which have Redstone Control functionality. This means that a tile can be set to ignore redstone entirely, or
* respond to a low or high redstone state.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IRedstoneControl extends IRedstoneCache {
diff --git a/src/main/java/cofh/api/tileentity/ISecurable.java b/src/main/java/cofh/api/tileentity/ISecurable.java
index 06018fa6..fd29f1e6 100644
--- a/src/main/java/cofh/api/tileentity/ISecurable.java
+++ b/src/main/java/cofh/api/tileentity/ISecurable.java
@@ -1,18 +1,22 @@
package cofh.api.tileentity;
+import com.mojang.authlib.GameProfile;
+
+import net.minecraft.entity.player.EntityPlayer;
+
/**
* Implement this interface on Tile Entities which can have access restrictions.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface ISecurable {
/**
* Enum for Access Modes - Restricted is Friends Only, Private is Owner only.
- *
+ *
* @author King Lemming
- *
+ *
*/
public static enum AccessMode {
PUBLIC, RESTRICTED, PRIVATE;
@@ -47,10 +51,14 @@ public interface ISecurable {
boolean setOwnerName(String name);
+ boolean setOwner(GameProfile name);
+
AccessMode getAccess();
String getOwnerName();
- boolean canPlayerAccess(String name);
+ GameProfile getOwner();
+
+ boolean canPlayerAccess(EntityPlayer player);
}
diff --git a/src/main/java/cofh/api/tileentity/ISidedTexture.java b/src/main/java/cofh/api/tileentity/ISidedTexture.java
index 1d5884f4..20be6dd6 100644
--- a/src/main/java/cofh/api/tileentity/ISidedTexture.java
+++ b/src/main/java/cofh/api/tileentity/ISidedTexture.java
@@ -5,15 +5,15 @@ import net.minecraft.util.IIcon;
/**
* Implement this interface on Tile Entities which can change their block's texture based on the current render pass. The block must defer the call to its Tile
* Entity.
- *
+ *
* @author Zeldo Kavira
- *
+ *
*/
public interface ISidedTexture {
/**
* Returns the icon to use for a given side and render pass.
- *
+ *
* @param side
* Block side to get the texture for.
* @param pass
diff --git a/src/main/java/cofh/api/tileentity/ITileInfo.java b/src/main/java/cofh/api/tileentity/ITileInfo.java
index f040694a..87e4ce8f 100644
--- a/src/main/java/cofh/api/tileentity/ITileInfo.java
+++ b/src/main/java/cofh/api/tileentity/ITileInfo.java
@@ -8,15 +8,15 @@ import net.minecraftforge.common.util.ForgeDirection;
/**
* Implement this interface on Tile Entities which can provide information about themselves.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface ITileInfo {
/**
* This function appends information to a list provided to it.
- *
+ *
* @param info
* The list that the information should be appended to.
* @param side
diff --git a/src/main/java/cofh/api/transport/IEnderDestination.java b/src/main/java/cofh/api/transport/IEnderDestination.java
new file mode 100644
index 00000000..30153c0d
--- /dev/null
+++ b/src/main/java/cofh/api/transport/IEnderDestination.java
@@ -0,0 +1,17 @@
+package cofh.api.transport;
+
+public interface IEnderDestination extends IEnderAttuned {
+
+ public boolean isNotValid();
+
+ public int x();
+ public int y();
+ public int z();
+ public int dimension();
+
+ public int getDestination();
+
+ public boolean setDestination(int frequency);
+
+ public boolean clearDestination();
+}
diff --git a/src/main/java/cofh/api/transport/IEnderEnergyHandler.java b/src/main/java/cofh/api/transport/IEnderEnergyHandler.java
index 0886be76..892a5c66 100644
--- a/src/main/java/cofh/api/transport/IEnderEnergyHandler.java
+++ b/src/main/java/cofh/api/transport/IEnderEnergyHandler.java
@@ -2,9 +2,9 @@ package cofh.api.transport;
/**
* This interface is implemented on Ender Attuned objects which can receive Energy (Redstone Flux).
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IEnderEnergyHandler extends IEnderAttuned {
@@ -15,7 +15,7 @@ public interface IEnderEnergyHandler extends IEnderAttuned {
/**
* This should be checked to see if the Ender Attuned object can currently receive energy (Redstone Flux).
- *
+ *
* Note: In practice, this can (and should) be used to ensure that something does not send to itself.
*/
boolean canReceiveEnergy();
@@ -23,7 +23,7 @@ public interface IEnderEnergyHandler extends IEnderAttuned {
/**
* This tells the Ender Attuned object to receive energy. This returns the amount remaining, *not* the amount received - a return of 0 means that all energy
* was received!
- *
+ *
* @param energy
* Amount of energy to be received.
* @param simulate
diff --git a/src/main/java/cofh/api/transport/IEnderFluidHandler.java b/src/main/java/cofh/api/transport/IEnderFluidHandler.java
index 3927fe1b..2f509e81 100644
--- a/src/main/java/cofh/api/transport/IEnderFluidHandler.java
+++ b/src/main/java/cofh/api/transport/IEnderFluidHandler.java
@@ -4,9 +4,9 @@ import net.minecraftforge.fluids.FluidStack;
/**
* This interface is implemented on Ender Attuned objects which can receive Fluid.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IEnderFluidHandler extends IEnderAttuned {
@@ -17,7 +17,7 @@ public interface IEnderFluidHandler extends IEnderAttuned {
/**
* This should be checked to see if the Ender Attuned object can currently receive a FluidStack.
- *
+ *
* Note: In practice, this can (and should) be used to ensure that something does not send to itself.
*/
boolean canReceiveFluid();
@@ -25,7 +25,7 @@ public interface IEnderFluidHandler extends IEnderAttuned {
/**
* This tells the Ender Attuned object to receive a FluidStack. This returns what remains of the original stack, *not* the amount received - a null return
* means that the entire stack was received!
- *
+ *
* @param fluid
* FluidStack to be received.
* @param simulate
diff --git a/src/main/java/cofh/api/transport/IEnderItemHandler.java b/src/main/java/cofh/api/transport/IEnderItemHandler.java
index 2944a001..d5dad8f3 100644
--- a/src/main/java/cofh/api/transport/IEnderItemHandler.java
+++ b/src/main/java/cofh/api/transport/IEnderItemHandler.java
@@ -4,9 +4,9 @@ import net.minecraft.item.ItemStack;
/**
* This interface is implemented on Ender Attuned objects which can receive Items.
- *
+ *
* @author King Lemming
- *
+ *
*/
public interface IEnderItemHandler extends IEnderAttuned {
@@ -17,7 +17,7 @@ public interface IEnderItemHandler extends IEnderAttuned {
/**
* This should be checked to see if the Ender Attuned object can currently receive an ItemStack.
- *
+ *
* Note: In practice, this can (and should) be used to ensure that something does not send to itself.
*/
boolean canReceiveItems();
@@ -25,10 +25,10 @@ public interface IEnderItemHandler extends IEnderAttuned {
/**
* This tells the Ender Attuned object to receive an ItemStack. This returns what remains of the original stack, *not* the amount received - a null return
* means that the entire stack was received!
- *
+ *
* This function does not support simulation because Inventory manipulation in Minecraft is an absolute mess and it would be a computational liability to do
* so.
- *
+ *
* @param item
* ItemStack to be received.
* @return An ItemStack representing how much is remaining.
diff --git a/src/main/java/cofh/api/transport/IItemDuct.java b/src/main/java/cofh/api/transport/IItemDuct.java
index 4c50c856..67338346 100644
--- a/src/main/java/cofh/api/transport/IItemDuct.java
+++ b/src/main/java/cofh/api/transport/IItemDuct.java
@@ -5,16 +5,16 @@ import net.minecraftforge.common.util.ForgeDirection;
/**
* This interface is implemented on ItemDucts. Use it to attempt to eject items into an entry point.
- *
+ *
* @author Zeldo Kavira, King Lemming
- *
+ *
*/
public interface IItemDuct {
/**
* Insert an ItemStack into the IItemDuct. Will only accept items if there is a valid destination. This returns what is remaining of the original stack - a
* null return means that the entire stack was accepted/routed!
- *
+ *
* @param from
* Orientation the item is inserted from.
* @param item
diff --git a/src/main/java/cofh/api/transport/RegistryEnderAttuned.java b/src/main/java/cofh/api/transport/RegistryEnderAttuned.java
index 0f91b215..9213d95f 100644
--- a/src/main/java/cofh/api/transport/RegistryEnderAttuned.java
+++ b/src/main/java/cofh/api/transport/RegistryEnderAttuned.java
@@ -1,7 +1,5 @@
package cofh.api.transport;
-import gnu.trove.map.hash.THashMap;
-
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -10,23 +8,69 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.WorldServer;
+import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.config.Configuration;
public final class RegistryEnderAttuned {
- public static Map