Started on my own energy interfaces

Plan to replace most of UE calls with these though i will still keep the
UE calls but will send them to these new methods.
This commit is contained in:
Robert 2013-11-28 12:33:45 -05:00
parent 1e36c674a3
commit fbebc2ffa9
16 changed files with 59 additions and 25 deletions

View file

@ -1,7 +1,10 @@
package dark.api;
/** Drone does not imply robot it simply means entity by which is controlled by another entity such
* as a player or a hivemind.
* as a player or a hivemind. Though it does imply that the entity still acts on its own but follows
* a set of instructions.
*
* @Extends Entity at all times
*
* @author DarkGuardsman */
public interface IDrone

View file

@ -2,7 +2,7 @@ package dark.api;
import net.minecraft.item.ItemStack;
/** Applied to blocks that store items in stacks above 64
/** Applied to blocks that store items in stacks above 64 and as one large collective of items
*
* @author DarkGuardsman */
public interface IExtendedStorage

View file

@ -1,12 +0,0 @@
package dark.api;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
public interface IHelpFrame<E>
{
public String getTitle(EntityPlayer player, E item);
public void getDisplayList(EntityPlayer player, E item, List<String> list);
}

View file

@ -9,7 +9,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import dark.api.IVirtualObject;
import dark.api.save.IVirtualObject;
import dark.api.save.NBTFileHelper;
import dark.api.save.SaveManager;

View file

@ -6,7 +6,6 @@ import java.util.List;
import java.util.Map.Entry;
import net.minecraft.entity.player.EntityPlayer;
import dark.api.ITerminal;
/** @author DarkGuardsman */
public class GroupRegistry

View file

@ -1,9 +1,8 @@
package dark.api;
package dark.api.access;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import dark.api.access.ISpecialAccess;
import dark.core.interfaces.IScroll;
/** Basic methods to make it easier to construct or interact with a terminal based tile. Recommend to

View file

@ -3,7 +3,6 @@ package dark.api.access;
import java.util.Set;
import net.minecraft.entity.player.EntityPlayer;
import dark.api.ITerminal;
/** Prefab for creating commands that most terminal entities can use
*

View file

@ -0,0 +1,19 @@
package dark.api.energy;
/** Container for energy data
*
* @author DarkGuardsman */
public class EnergyPacket
{
protected String energyType;
protected float energyStored;
protected Object[] data;
public EnergyPacket(String type, float energySum, Object... data)
{
this.energyType = type;
this.energyStored = energySum;
this.data = data;
}
}

View file

@ -0,0 +1,10 @@
package dark.api.energy;
import net.minecraftforge.common.ForgeDirection;
public interface IEnergyConsumer extends IEnergyDevice
{
public float receiveEnergy(ForgeDirection from, EnergyPacket receive, boolean doReceive);
public EnergyPacket getRequest(ForgeDirection direction);
}

View file

@ -0,0 +1,9 @@
package dark.api.energy;
import dark.api.parts.ITileConnector;
public interface IEnergyDevice extends ITileConnector
{
}

View file

@ -0,0 +1,10 @@
package dark.api.energy;
import net.minecraftforge.common.ForgeDirection;
public interface IEnergyProvider extends IEnergyDevice
{
public EnergyPacket provideEnergy(ForgeDirection from, EnergyPacket request, boolean doProvide);
public EnergyPacket getEnergyProduce(ForgeDirection direction);
}

View file

@ -1,9 +1,8 @@
package dark.api;
package dark.api.parts;
import java.util.List;
import net.minecraft.tileentity.TileEntity;
import dark.api.parts.ITileConnector;
import dark.core.prefab.tilenetwork.NetworkTileEntities;
public interface INetworkHost extends ITileConnector

View file

@ -1,4 +1,4 @@
package dark.api;
package dark.api.save;
import java.io.File;

View file

@ -11,7 +11,6 @@ import net.minecraft.server.MinecraftServer;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.world.WorldEvent;
import cpw.mods.fml.common.FMLLog;
import dark.api.IVirtualObject;
public class SaveManager
{

View file

@ -4,8 +4,8 @@ import java.util.HashSet;
import java.util.Set;
import net.minecraft.entity.player.EntityPlayer;
import dark.api.ITerminal;
import dark.api.access.ISpecialAccess;
import dark.api.access.ITerminal;
import dark.api.access.ITerminalCommand;
public class CommandUser implements ITerminalCommand

View file

@ -12,8 +12,8 @@ import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
import dark.api.ITerminal;
import dark.api.access.GroupRegistry;
import dark.api.access.ITerminal;
import dark.core.network.PacketHandler;
import dark.core.prefab.machine.TileEntityEnergyMachine;