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:
parent
1e36c674a3
commit
fbebc2ffa9
16 changed files with 59 additions and 25 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
*
|
||||
|
|
19
src/dark/api/energy/EnergyPacket.java
Normal file
19
src/dark/api/energy/EnergyPacket.java
Normal 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;
|
||||
}
|
||||
}
|
10
src/dark/api/energy/IEnergyConsumer.java
Normal file
10
src/dark/api/energy/IEnergyConsumer.java
Normal 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);
|
||||
}
|
9
src/dark/api/energy/IEnergyDevice.java
Normal file
9
src/dark/api/energy/IEnergyDevice.java
Normal file
|
@ -0,0 +1,9 @@
|
|||
package dark.api.energy;
|
||||
|
||||
import dark.api.parts.ITileConnector;
|
||||
|
||||
public interface IEnergyDevice extends ITileConnector
|
||||
{
|
||||
|
||||
|
||||
}
|
10
src/dark/api/energy/IEnergyProvider.java
Normal file
10
src/dark/api/energy/IEnergyProvider.java
Normal 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);
|
||||
}
|
|
@ -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
|
|
@ -1,4 +1,4 @@
|
|||
package dark.api;
|
||||
package dark.api.save;
|
||||
|
||||
import java.io.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
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue