massive package and file movement

This commit is contained in:
DarkGuardsman 2013-07-22 01:00:00 -04:00
parent b44b1d709f
commit 7e1ef517b9
86 changed files with 329 additions and 561 deletions

View file

@ -1,9 +1,23 @@
package dark.api; package dark.api;
public enum ColorCode public enum ColorCode
{ {
BLACK("Black"), RED("Red"), GREEN("Green"), BROWN("Brown"), BLUE("Blue"), PURPLE("Purple"), CYAN("Cyan"), SILVER("Silver"), GREY("Grey"), PINK("Pink"), LIME("Lime"), YELLOW("Yellow"), LIGHTBLUE("LightBlue"), WHITE("White"), ORANGE("Orange"), NONE(""); BLACK("Black"),
RED("Red"),
GREEN("Green"),
BROWN("Brown"),
BLUE("Blue"),
PURPLE("Purple"),
CYAN("Cyan"),
SILVER("Silver"),
GREY("Grey"),
PINK("Pink"),
LIME("Lime"),
YELLOW("Yellow"),
LIGHTBLUE("LightBlue"),
WHITE("White"),
ORANGE("Orange"),
NONE("");
String name; String name;
@ -17,12 +31,10 @@ public enum ColorCode
return this.name; return this.name;
} }
/** /** gets a ColorCode from any of the following
* gets a ColorCode from any of the following
* *
* @param obj - Integer,String,LiquidData,ColorCode * @param obj - Integer,String,LiquidData,ColorCode
* @return Color NONE if it can't find it * @return Color NONE if it can't find it */
*/
public static ColorCode get(Object obj) public static ColorCode get(Object obj)
{ {
if (obj instanceof Integer && ((Integer) obj) < ColorCode.values().length) if (obj instanceof Integer && ((Integer) obj) < ColorCode.values().length)
@ -46,5 +58,4 @@ public enum ColorCode
return NONE; return NONE;
} }
} }

View file

@ -0,0 +1,12 @@
package dark.api;
import net.minecraft.entity.player.EntityPlayer;
/** A general interface to be implemented by anything that needs it.
*
* @author Calclavia */
public interface IBlockActivate
{
/** Called when activated */
public boolean onActivated(EntityPlayer entityPlayer);
}

View file

@ -2,31 +2,22 @@ package dark.api;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
/** /** Used by TileEntities or Entities to show heat stored and cooling rate of the object
* Used by TileEntities or Entities to show heat stored and cooling rate of the object
* *
* @author DarkGuardsman * @author DarkGuardsman */
*
*/
public interface IHeatObject public interface IHeatObject
{ {
/** /** Amount of heat stored in the body of the object
* Amount of heat stored in the body of the object
* *
* @return amount of heat in generic units * @return amount of heat in generic units */
*/
public double getHeat(ForgeDirection side); public double getHeat(ForgeDirection side);
/** /** Sets the heat level of the object or increase it
* Sets the heat level of the object or increase it
* *
* @param amount - amount to set or increase by * @param amount - amount to set or increase by
* @param incrase - true if should increase the current heat level * @param incrase - true if should increase the current heat level */
*/
public void setHeat(double amount, boolean incrase); public void setHeat(double amount, boolean incrase);
/** /** Rate by which this object can cool by from the given side */
* Rate by which this object can cool by from the given side
*/
public double getCoolingRate(ForgeDirection side); public double getCoolingRate(ForgeDirection side);
} }

View file

@ -4,13 +4,9 @@ import net.minecraftforge.common.ForgeDirection;
public interface IHeatProducer public interface IHeatProducer
{ {
/** /** Checks too see if this can produce heat */
*Checks too see if this can produce heat
*/
public boolean getCanProduceHeat(ForgeDirection dir); public boolean getCanProduceHeat(ForgeDirection dir);
/** /** Gets the amount of heat in joules this can output */
* Gets the amount of heat in joules this can output
*/
public double getHeatAmmount(ForgeDirection dir); public double getHeatAmmount(ForgeDirection dir);
} }

View file

@ -7,23 +7,15 @@ import dark.core.tile.network.NetworkTileEntities;
public interface INetworkPart extends ITileConnector public interface INetworkPart extends ITileConnector
{ {
/** /** Array of connections this tile has to other tiles */
* Array of connections this tile has to other tiles
*/
public List<TileEntity> getNetworkConnections(); public List<TileEntity> getNetworkConnections();
/** /** Update the connection this tile has to other tiles */
* Update the connection this tile has to other tiles
*/
public void refresh(); public void refresh();
/** /** Gets the networkPart's primary network */
* Gets the networkPart's primary network
*/
public NetworkTileEntities getTileNetwork(); public NetworkTileEntities getTileNetwork();
/** /** Sets the networkPart's primary network */
* Sets the networkPart's primary network
*/
public void setTileNetwork(NetworkTileEntities fluidNetwok); public void setTileNetwork(NetworkTileEntities fluidNetwok);
} }

View file

@ -1,17 +1,11 @@
package dark.api; package dark.api;
/** A tileEntity that receives a pressure driven fluid. Suggested to use some of the class from
/**
* A tileEntity that receives a pressure driven fluid. Suggested to use some of the class from
* net.minecraftforge.liquids too make your machine work with other fluid mods that don't use * net.minecraftforge.liquids too make your machine work with other fluid mods that don't use
* pressure * pressure */
*/
public interface IPsiReciever extends ITileConnector public interface IPsiReciever extends ITileConnector
{ {
/** /** the load that this machine is handling, working, or moving */
* the load that this machine is handling, working, or moving
*/
public double getPressureLoad(); public double getPressureLoad();
} }

View file

@ -2,10 +2,8 @@ package dark.api;
public interface IScroll public interface IScroll
{ {
/** /** Scrolls the text field up or down. Client side only. Positive value will scroll the text down
* Scrolls the text field up or down. Client side only. Positive value will scroll the text down * while a negative value will scroll it up. */
* while a negative value will scroll it up.
*/
public void scroll(int amount); public void scroll(int amount);
public void setScroll(int length); public void setScroll(int length);

View file

@ -2,8 +2,8 @@ package dark.api;
import java.util.List; import java.util.List;
import dark.library.access.AccessLevel; import dark.core.access.AccessLevel;
import dark.library.access.UserAccess; import dark.core.access.UserAccess;
/** Used by any object that needs to restrict access to it by a set of usernames /** Used by any object that needs to restrict access to it by a set of usernames
* *

View file

@ -1,18 +1,12 @@
package dark.api; package dark.api;
import java.util.List; import java.util.List;
public interface ITerminal extends ISpecialAccess, IScroll public interface ITerminal extends ISpecialAccess, IScroll
{ {
/** /** Gets an output of the string stored in the console. */
* Gets an output of the string stored in the console.
*/
public List<String> getTerminalOuput(); public List<String> getTerminalOuput();
/** /** Adds a string to the console. Server side only. */
* Adds a string to the console. Server side only.
*/
public boolean addToConsole(String msg); public boolean addToConsole(String msg);
} }

View file

@ -5,8 +5,6 @@ import net.minecraftforge.common.ForgeDirection;
public interface ITileConnector public interface ITileConnector
{ {
/** /** Can this tile connect on the given side */
* Can this tile connect on the given side
*/
public boolean canTileConnect(TileEntity entity, ForgeDirection dir); public boolean canTileConnect(TileEntity entity, ForgeDirection dir);
} }

View file

@ -5,14 +5,12 @@ import net.minecraftforge.common.ForgeDirection;
public interface IToolReadOut public interface IToolReadOut
{ {
/** /** Grabs the message displayed to the user on right click of the machine with the pipe gauge
* Grabs the message displayed to the user on right click of the machine with the pipe gauge
* *
* @param user * @param user
* @param side - may not work correctly yet but should give you a side * @param side - may not work correctly yet but should give you a side
* @return - a string to be displayed to the player for a reading. automatically adds ReadOut: * @return - a string to be displayed to the player for a reading. automatically adds ReadOut:
* to the beginning * to the beginning */
*/
public String getMeterReading(EntityPlayer user, ForgeDirection side, EnumTools tool); public String getMeterReading(EntityPlayer user, ForgeDirection side, EnumTools tool);
public static enum EnumTools public static enum EnumTools

View file

@ -20,7 +20,7 @@ public enum PowerSystems
private static Boolean[] loaded; private static Boolean[] loaded;
/** Checks to see if something can run powerless based on mods loaded /** Checks to see if something can run powerless based on mods loaded
* *
* @param optional - power system that the device can use * @param optional - power system that the device can use
* @return true if free power is to be generated */ * @return true if free power is to be generated */
public static boolean runPowerLess(PowerSystems... optional) public static boolean runPowerLess(PowerSystems... optional)

View file

@ -1,6 +1,6 @@
package dark.core; package dark.core;
public class ClientProxy extends MainProxy public class ClientProxy extends CommonProxy
{ {
} }

View file

@ -1,6 +1,6 @@
package dark.core; package dark.core;
public class MainProxy public class CommonProxy
{ {
public void preInit() public void preInit()
{ {

View file

@ -24,15 +24,13 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStoppingEvent; import cpw.mods.fml.common.event.FMLServerStoppingEvent;
import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import dark.core.items.parts.BlockOre; import dark.core.blocks.BlockMulti;
import dark.core.items.parts.EnumMeterials; import dark.core.blocks.BlockOre;
import dark.core.items.parts.ItemOre; import dark.core.blocks.TileEntityMulti;
import dark.core.items.parts.ItemOreDirv; import dark.core.helpers.FluidRestrictionHandler;
import dark.core.recipes.RecipeManager; import dark.core.items.EnumMeterials;
import dark.helpers.FluidRestrictionHandler; import dark.core.items.ItemOre;
import dark.library.saving.SaveManager; import dark.core.items.ItemOreDirv;
import dark.prefab.machine.BlockMulti;
import dark.prefab.machine.TileEntityMulti;
/** @author HangCow, DarkGuardsman */ /** @author HangCow, DarkGuardsman */
@Mod(modid = DarkMain.MOD_ID, name = DarkMain.MOD_NAME, version = DarkMain.VERSION, dependencies = "after:IC2,after:BuildCraft|Energy", useMetadata = true) @Mod(modid = DarkMain.MOD_ID, name = DarkMain.MOD_NAME, version = DarkMain.VERSION, dependencies = "after:IC2,after:BuildCraft|Energy", useMetadata = true)
@ -50,8 +48,8 @@ public class DarkMain extends ModPrefab
public static final String MOD_NAME = "Dark Heart"; public static final String MOD_NAME = "Dark Heart";
public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + REVIS_VERSION + "." + BUILD_VERSION; public static final String VERSION = MAJOR_VERSION + "." + MINOR_VERSION + "." + REVIS_VERSION + "." + BUILD_VERSION;
@SidedProxy(clientSide = "dark.core.ClientProxy", serverSide = "dark.core.MainProxy") @SidedProxy(clientSide = "dark.core.ClientProxy", serverSide = "dark.core.CommonProxy")
public static MainProxy proxy; public static CommonProxy proxy;
public static final String CHANNEL = "DarkPackets"; public static final String CHANNEL = "DarkPackets";

View file

@ -0,0 +1,19 @@
package dark.core;
import net.minecraft.nbt.NBTTagCompound;
/** Classes the register to need saving on world save use this
*
* @author DarkGuardsman */
public interface INbtSave
{
/** gets the file name to save as */
public String saveFileName();
/** the data to save when saving to the file */
public NBTTagCompound getSaveData();
/** can the file be saved at this moment */
public boolean shouldSave(boolean isServer);
}

View file

@ -1,7 +1,5 @@
package dark.core; package dark.core;
import net.minecraftforge.common.Configuration;
import org.modstats.Modstats; import org.modstats.Modstats;
import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.EventHandler;
@ -12,7 +10,6 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
public abstract class ModPrefab public abstract class ModPrefab
{ {
public String DOMAIN = "dark"; public String DOMAIN = "dark";
public String PREFIX = DOMAIN + ":"; public String PREFIX = DOMAIN + ":";

View file

@ -1,4 +1,4 @@
package dark.library.saving; package dark.core;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;

View file

@ -1,11 +1,11 @@
package dark.core.recipes; package dark.core;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.item.crafting.FurnaceRecipes;
import dark.core.items.parts.EnumMeterials; import dark.core.items.EnumMeterials;
import dark.core.items.parts.EnumOreParts; import dark.core.items.EnumOreParts;
public class RecipeManager public class RecipeManager
{ {

View file

@ -1,13 +1,9 @@
package dark.library.saving; package dark.core;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.world.WorldEvent;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
public class SaveManager public class SaveManager
{ {
@ -33,7 +29,6 @@ public class SaveManager
nbtSaveList.add(saveClass); nbtSaveList.add(saveClass);
} }
} }
/** Called to get all INbtSave classes to do a save to world */ /** Called to get all INbtSave classes to do a save to world */
public static void save(boolean isServer) public static void save(boolean isServer)

View file

@ -1,24 +0,0 @@
package dark.core;
public class ServerLoad
{
public void preInit()
{
// TODO Auto-generated method stub
}
public void Init()
{
// TODO Auto-generated method stub
}
public void postInit()
{
// TODO Auto-generated method stub
}
}

View file

@ -1,8 +1,12 @@
package dark.library.access; package dark.core.access;
public enum AccessLevel public enum AccessLevel
{ {
NONE("None"), BASIC("Basic"), USER("Standard"), ADMIN("Admin"), OWNER("Owner"); NONE("None"),
BASIC("Basic"),
USER("Standard"),
ADMIN("Admin"),
OWNER("Owner");
public String displayName; public String displayName;
@ -11,11 +15,9 @@ public enum AccessLevel
displayName = name; displayName = name;
} }
/** /** Gets the access level in varies ways
* Gets the access level in varies ways
* *
* @return AccessLevel NONE instead of null if correct level can't be found. * @return AccessLevel NONE instead of null if correct level can't be found. */
*/
public static AccessLevel get(Object ob) public static AccessLevel get(Object ob)
{ {
if (ob instanceof String) if (ob instanceof String)

View file

@ -1,9 +1,9 @@
package dark.library.access; package dark.core.access;
public class GlobalAccess public class GlobalAccess
{ {
public GlobalAccess(String name) public GlobalAccess(String name)
{ {
} }
} }

View file

@ -1,11 +1,11 @@
package dark.library.access; package dark.core.access;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod.ServerStarting; import cpw.mods.fml.common.Mod.ServerStarting;
import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent;
import dark.library.saving.INbtSave; import dark.core.INbtSave;
import dark.library.saving.SaveManager; import dark.core.SaveManager;
public class GlobalAccessLoader implements INbtSave public class GlobalAccessLoader implements INbtSave
{ {

View file

@ -1,4 +1,4 @@
package dark.library.access; package dark.core.access;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -8,7 +8,7 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import dark.library.saving.NBTFileLoader; import dark.core.NBTFileLoader;
public class GlobalAccessManager public class GlobalAccessManager
{ {

View file

@ -1,4 +1,4 @@
package dark.library.access; package dark.core.access;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager; import net.minecraft.network.INetworkManager;
@ -12,7 +12,10 @@ public class GuiPacketManager extends PacketManager
{ {
public enum GuiPacketType public enum GuiPacketType
{ {
USER_LISTS_REQUEST, USER_LISTS, LISTS_DATA, LISTS_DATA_REQUEST; USER_LISTS_REQUEST,
USER_LISTS,
LISTS_DATA,
LISTS_DATA_REQUEST;
} }
@Override @Override

View file

@ -1,4 +1,4 @@
package dark.library.access; package dark.core.access;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -19,9 +19,7 @@ public class UserAccess
this.shouldSave = save; this.shouldSave = save;
} }
/** /** Write to nbt */
* Write to nbt
*/
public NBTTagCompound writeToNBT(NBTTagCompound nbt) public NBTTagCompound writeToNBT(NBTTagCompound nbt)
{ {
nbt.setString("username", this.username); nbt.setString("username", this.username);
@ -29,9 +27,7 @@ public class UserAccess
return nbt; return nbt;
} }
/** /** Read from nbt */
* Read from nbt
*/
public void readFromNBT(NBTTagCompound nbt) public void readFromNBT(NBTTagCompound nbt)
{ {
this.username = nbt.getString("username"); this.username = nbt.getString("username");
@ -44,14 +40,11 @@ public class UserAccess
access.readFromNBT(nbt); access.readFromNBT(nbt);
return access; return access;
} }
/** Reads an entire UserAccess list from an nbt file
/**
* Reads an entire UserAccess list from an nbt file
* *
* @param nbt - nbt being read * @param nbt - nbt being read
* @return - the list * @return - the list */
*/
public static List<UserAccess> readListFromNBT(NBTTagCompound nbt, String tagName) public static List<UserAccess> readListFromNBT(NBTTagCompound nbt, String tagName)
{ {
@ -65,12 +58,10 @@ public class UserAccess
return users; return users;
} }
/** /** writes an entire UserAccess list to nbt at one time
* writes an entire UserAccess list to nbt at one time
* *
* @param save - nbt to save to * @param save - nbt to save to
* @param users - list to save * @param users - list to save */
*/
public static void writeListToNBT(NBTTagCompound save, List<UserAccess> users) public static void writeListToNBT(NBTTagCompound save, List<UserAccess> users)
{ {
NBTTagList usersTag = new NBTTagList(); NBTTagList usersTag = new NBTTagList();
@ -88,9 +79,7 @@ public class UserAccess
save.setTag("Users", usersTag); save.setTag("Users", usersTag);
} }
/** /** Removes a user from a list of UserAccess then returns that list */
* Removes a user from a list of UserAccess then returns that list
*/
public static List<UserAccess> removeUserAccess(String player, List<UserAccess> users) public static List<UserAccess> removeUserAccess(String player, List<UserAccess> users)
{ {
List<UserAccess> removeList = new ArrayList<UserAccess>(); List<UserAccess> removeList = new ArrayList<UserAccess>();

View file

@ -1,4 +1,4 @@
package dark.prefab.machine; package dark.core.blocks;
import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;

View file

@ -1,4 +1,4 @@
package dark.prefab.machine; package dark.core.blocks;
import java.util.Random; import java.util.Random;

View file

@ -1,4 +1,4 @@
package dark.core.items.parts; package dark.core.blocks;
import java.util.List; import java.util.List;
@ -11,7 +11,8 @@ import net.minecraft.util.Icon;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import dark.core.DarkMain; import dark.core.DarkMain;
import dark.core.recipes.RecipeManager; import dark.core.RecipeManager;
import dark.core.items.EnumMeterials;
public class BlockOre extends Block public class BlockOre extends Block
{ {

View file

@ -1,28 +1,22 @@
package dark.prefab.machine; package dark.core.blocks;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.Vector3;
import dark.api.IBlockActivate;
/** /** Interface to be applied to tile entity blocks that occupies more than one block space. Useful for
* Interface to be applied to tile entity blocks that occupies more than one block space. Useful for
* large machines. * large machines.
* *
* @author Calclavia * @author Calclavia */
*
*/
public interface IMultiBlock extends IBlockActivate public interface IMultiBlock extends IBlockActivate
{ {
/** /** Called when this multiblock is created
* Called when this multiblock is created
* *
* @param placedPosition - The position the block was placed at * @param placedPosition - The position the block was placed at */
*/
public void onCreate(Vector3 placedPosition); public void onCreate(Vector3 placedPosition);
/** /** Called when one of the multiblocks of this block is destroyed
* Called when one of the multiblocks of this block is destroyed
* *
* @param callingBlock - The tile entity who called the onDestroy function * @param callingBlock - The tile entity who called the onDestroy function */
*/
public void onDestroy(TileEntity callingBlock); public void onDestroy(TileEntity callingBlock);
} }

View file

@ -1,4 +1,4 @@
package dark.core.items.parts; package dark.core.blocks;
import java.util.Random; import java.util.Random;

View file

@ -1,4 +1,4 @@
package dark.core.items.parts; package dark.core.blocks;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View file

@ -1,4 +1,4 @@
package dark.prefab.machine; package dark.core.blocks;
import java.util.Random; import java.util.Random;

View file

@ -1,4 +1,4 @@
package dark.prefab.machine; package dark.core.blocks;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;

View file

@ -1,4 +1,4 @@
package dark.core.render; package dark.core.client;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;

View file

@ -1,8 +0,0 @@
package dark.core.client;
import dark.core.ServerLoad;
public class ClientLoad extends ServerLoad
{
}

View file

@ -1,4 +1,4 @@
package dark.core.render; package dark.core.client;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;

View file

@ -1,4 +1,4 @@
package dark.library.effects; package dark.core.client;
import java.awt.Color; import java.awt.Color;
@ -16,12 +16,9 @@ import universalelectricity.core.vector.Vector3;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import dark.core.DarkMain; import dark.core.DarkMain;
/** /** Based off Thaumcraft's Beam Renderer.
* Based off Thaumcraft's Beam Renderer.
* *
* @author Calclavia, Azanor * @author Calclavia, Azanor */
*
*/
public class FXBeam extends EntityFX public class FXBeam extends EntityFX
{ {
double movX = 0.0D; double movX = 0.0D;
@ -40,21 +37,22 @@ public class FXBeam extends EntityFX
private int rotationSpeed = 20; private int rotationSpeed = 20;
private float prevSize = 0.0F; private float prevSize = 0.0F;
private float beamD = 0.08f; private float beamD = 0.08f;
private String texture = DarkMain.TEXTURE_DIRECTORY+""; private String texture = DarkMain.TEXTURE_DIRECTORY + "";
public FXBeam(World world, Vector3 start, Vector3 end, Color color, String texture, int age, boolean pulse) public FXBeam(World world, Vector3 start, Vector3 end, Color color, String texture, int age, boolean pulse)
{ {
this(world, start, end, color, texture, age); this(world, start, end, color, texture, age);
this.pulse = pulse; this.pulse = pulse;
} }
public FXBeam(World world, Vector3 start, Vector3 end, Color color, String texture, int age) public FXBeam(World world, Vector3 start, Vector3 end, Color color, String texture, int age)
{ {
super(world, start.x, start.y, start.z, 0.0D, 0.0D, 0.0D); super(world, start.x, start.y, start.z, 0.0D, 0.0D, 0.0D);
this.setRGB(color.getRed(), color.getGreen(), color.getBlue()); this.setRGB(color.getRed(), color.getGreen(), color.getBlue());
this.texture = texture; this.texture = texture;
this.setSize(0.02F, 0.02F); this.setSize(0.02F, 0.02F);
this.noClip = true; this.noClip = true;
this.motionX = 0.0D; this.motionX = 0.0D;
@ -73,9 +71,7 @@ public class FXBeam extends EntityFX
this.particleMaxAge = age; this.particleMaxAge = age;
/** /** Sets the particle age based on distance. */
* Sets the particle age based on distance.
*/
EntityLivingBase renderentity = Minecraft.getMinecraft().renderViewEntity; EntityLivingBase renderentity = Minecraft.getMinecraft().renderViewEntity;
int visibleDistance = 50; int visibleDistance = 50;

View file

@ -1,4 +1,4 @@
package dark.core.render; package dark.core.client;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

View file

@ -5,7 +5,7 @@
* 1.0, or MMPL. Please check the contents of the license located in * 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt * http://www.mod-buildcraft.com/MMPL-1.0.txt
*/ */
package dark.core.render; package dark.core.client;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.Render;

View file

@ -1,4 +1,4 @@
package dark.core.render; package dark.core.client;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
@ -12,7 +12,7 @@ public abstract class RenderMachine extends TileEntitySpecialRenderer
public RenderMachine() public RenderMachine()
{ {
} }
@Override @Override
@ -22,11 +22,12 @@ public abstract class RenderMachine extends TileEntitySpecialRenderer
} }
/** Sudo method for setting the texture for current render /** Sudo method for setting the texture for current render
*
* @param name */ * @param name */
public void bindTextureByName(String domain, String name) public void bindTextureByName(String domain, String name)
{ {
func_110628_a(new ResourceLocation(domain,name)); func_110628_a(new ResourceLocation(domain, name));
} }
public void bindTextureByName(ResourceLocation name) public void bindTextureByName(ResourceLocation name)

View file

@ -1,4 +1,4 @@
package dark.library.damage; package dark.core.damage;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -21,13 +21,10 @@ import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
/** /** Entity designed to take damage and apply it to the tile from an Entity. Simulates the tile is
* Entity designed to take damage and apply it to the tile from an Entity. Simulates the tile is
* alive and can be harmed by normal AIs without additional code. * alive and can be harmed by normal AIs without additional code.
* *
* @author DarkGuardsman * @author DarkGuardsman */
*
*/
public class EntityTileDamage extends EntityLiving implements IEntityAdditionalSpawnData public class EntityTileDamage extends EntityLiving implements IEntityAdditionalSpawnData
{ {

View file

@ -1,45 +1,33 @@
package dark.library.damage; package dark.core.damage;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
public interface IHpTile public interface IHpTile
{ {
/** /** Same as attackEntityFrom in Entity.class
* Same as attackEntityFrom in Entity.class
* *
* @param source - DamageSource/DamageType * @param source - DamageSource/DamageType
* @param ammount - amount of damage * @param ammount - amount of damage
* @return * @return */
*/
public boolean onDamageTaken(DamageSource source, float ammount); public boolean onDamageTaken(DamageSource source, float ammount);
/** /** Is this tile considered too still be alive. Allows for the tile to remain while being
* Is this tile considered too still be alive. Allows for the tile to remain while being * considered dead */
* considered dead
*/
public boolean isAlive(); public boolean isAlive();
/** /** Current hp of the tile */
* Current hp of the tile
*/
public int hp(); public int hp();
/** /** Sets the tiles hp
* Sets the tiles hp
* *
* @param i - amount * @param i - amount
* @param increase - increase instead of replace * @param increase - increase instead of replace */
*/
public void setHp(int i, boolean increase); public void setHp(int i, boolean increase);
/** /** Max hp of the object */
* Max hp of the object
*/
public int getMaxHealth(); public int getMaxHealth();
/** /** Can the potion be used on the Entity that is translating damage for the TileEntity */
* Can the potion be used on the Entity that is translating damage for the TileEntity
*/
public boolean canApplyPotion(PotionEffect par1PotionEffect); public boolean canApplyPotion(PotionEffect par1PotionEffect);
} }

View file

@ -1,4 +1,4 @@
package dark.library.damage; package dark.core.damage;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;

View file

@ -1,4 +1,4 @@
package dark.library.gui; package dark.core.gui;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;

View file

@ -1,4 +1,4 @@
package dark.library.gui; package dark.core.gui;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;

View file

@ -1,4 +1,4 @@
package dark.library.gui; package dark.core.gui;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import dark.api.IScroll; import dark.api.IScroll;
import dark.core.DarkMain; import dark.core.DarkMain;
import dark.library.access.UserAccess; import dark.core.access.UserAccess;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiGlobalList extends GuiContainer implements IScroll public class GuiGlobalList extends GuiContainer implements IScroll

View file

@ -1,18 +1,15 @@
package dark.library.gui; package dark.core.gui;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
/**
* TileEntities that wish to do something if an item is removed from a slot /** TileEntities that wish to do something if an item is removed from a slot */
*/
public interface ISlotPickResult public interface ISlotPickResult
{ {
/** /** If the slot in the gui does something if the item is removed
* If the slot in the gui does something if the item is removed
* *
* @param entityPlayer - player who removed the item, will pass null from automation * @param entityPlayer - player who removed the item, will pass null from automation
* @param slot - slot in the container class the item came from * @param slot - slot in the container class the item came from
* @param itemStack - item stack pulled from the slot * @param itemStack - item stack pulled from the slot */
*/
public void onPickUpFromSlot(EntityPlayer entityPlayer, int slot, ItemStack itemStack); public void onPickUpFromSlot(EntityPlayer entityPlayer, int slot, ItemStack itemStack);
} }

View file

@ -0,0 +1,8 @@
package dark.core.gui;
/** Add this to a container class if using WatchedSlot to trigger the container on slot change */
public interface ISlotWatcher
{
/** Will trigger if the watched slot has changed */
public void slotContentsChanged(int slot);
}

View file

@ -1,13 +1,10 @@
package dark.library.gui; package dark.core.gui;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
/** /** Easy class to create a slot that is used for an event trigger or crafting based event */
* Easy class to create a slot that is used for an event trigger or crafting based event
*
*/
public class SlotCraftingResult extends WatchedSlot public class SlotCraftingResult extends WatchedSlot
{ {
private ISlotPickResult tile; private ISlotPickResult tile;
@ -30,9 +27,7 @@ public class SlotCraftingResult extends WatchedSlot
return true; return true;
} }
/** /** When the slot has changed it calls @ISlotPickResult 's method */
* When the slot has changed it calls @ISlotPickResult 's method
*/
@Override @Override
public void onPickupFromSlot(EntityPlayer entityPlayer, ItemStack itemStack) public void onPickupFromSlot(EntityPlayer entityPlayer, ItemStack itemStack)
{ {

View file

@ -1,15 +1,12 @@
package dark.library.gui; package dark.core.gui;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
/** /** Slot that can only allow one itemStack into it
* Slot that can only allow one itemStack into it
* *
* @author DarkGuardsman * @author DarkGuardsman */
*
*/
public class SlotRestricted extends Slot public class SlotRestricted extends Slot
{ {
private ItemStack[] itemStacks; private ItemStack[] itemStacks;

View file

@ -1,11 +1,9 @@
package dark.library.gui; package dark.core.gui;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
/** /** A slot that triggers the container class if changed */
* A slot that triggers the container class if changed
*/
public class WatchedSlot extends Slot public class WatchedSlot extends Slot
{ {
private ISlotWatcher slotWatcher; private ISlotWatcher slotWatcher;

View file

@ -1,4 +1,4 @@
package dark.prefab.machine; package dark.core.helpers;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -18,23 +18,17 @@ import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe;
import cpw.mods.fml.relauncher.ReflectionHelper; import cpw.mods.fml.relauncher.ReflectionHelper;
import dark.helpers.Pair;
/** /** Rewrite of the imprinter crafting system into its own manageable class
* Rewrite of the imprinter crafting system into its own manageable class
* *
* @author DarkGuardsman * @author DarkGuardsman */
*
*/
public class AutoCraftingManager public class AutoCraftingManager
{ {
final static boolean doDebug = false; final static boolean doDebug = false;
TileEntity craftingEntity; TileEntity craftingEntity;
IInventory craftingInv; IInventory craftingInv;
/** /** The entity must be an instance of IInventory to pass only the tileEntity */
* The entity must be an instance of IInventory to pass only the tileEntity
*/
public AutoCraftingManager(final IAutoCrafter entity) public AutoCraftingManager(final IAutoCrafter entity)
{ {
this.craftingEntity = (TileEntity) entity; this.craftingEntity = (TileEntity) entity;
@ -44,9 +38,7 @@ public class AutoCraftingManager
} }
} }
/** /** Use only the entity if it is also an instance of IInventory */
* Use only the entity if it is also an instance of IInventory
*/
public AutoCraftingManager(final IAutoCrafter entity, final IInventory inv) public AutoCraftingManager(final IAutoCrafter entity, final IInventory inv)
{ {
this(entity); this(entity);
@ -64,11 +56,9 @@ public class AutoCraftingManager
} }
} }
/** /** Does this player's inventory contain the required resources to craft this item?
* Does this player's inventory contain the required resources to craft this item?
* *
* @return Required items to make the desired item. * @return Required items to make the desired item. */
*/
public Pair<ItemStack, ItemStack[]> getIdealRecipe(ItemStack outputItem) public Pair<ItemStack, ItemStack[]> getIdealRecipe(ItemStack outputItem)
{ {
this.printDebug("IdealRecipe", outputItem.toString()); this.printDebug("IdealRecipe", outputItem.toString());
@ -132,13 +122,11 @@ public class AutoCraftingManager
return null; return null;
} }
/** /** Gets the itemStacks in the inv based on slots
* Gets the itemStacks in the inv based on slots
* *
* @param inv - @IInventory instance * @param inv - @IInventory instance
* @param slots - slot # to be used * @param slots - slot # to be used
* @return array of itemStack the same size as the slots input array * @return array of itemStack the same size as the slots input array */
*/
public ItemStack[] getInvItems(IInventory inv, int... slots) public ItemStack[] getInvItems(IInventory inv, int... slots)
{ {
ItemStack[] containingItems = new ItemStack[slots.length]; ItemStack[] containingItems = new ItemStack[slots.length];
@ -154,11 +142,9 @@ public class AutoCraftingManager
return containingItems; return containingItems;
} }
/** /** Returns if the following inventory has the following resource required.
* Returns if the following inventory has the following resource required.
* *
* @param recipeItems - The items to be checked for the recipes. * @param recipeItems - The items to be checked for the recipes. */
*/
public ArrayList<ItemStack> hasResource(Object[] recipeItems) public ArrayList<ItemStack> hasResource(Object[] recipeItems)
{ {
try try
@ -170,9 +156,7 @@ public class AutoCraftingManager
{ {
this.printDebug("ResourceChecker", "Looking for " + recipeItems.toString()); this.printDebug("ResourceChecker", "Looking for " + recipeItems.toString());
} }
/** /** The actual amount of resource required. Each ItemStack will only have stacksize of 1. */
* The actual amount of resource required. Each ItemStack will only have stacksize of 1.
*/
ArrayList<ItemStack> actualResources = new ArrayList<ItemStack>(); ArrayList<ItemStack> actualResources = new ArrayList<ItemStack>();
int itemMatch = 0; int itemMatch = 0;
@ -200,9 +184,7 @@ public class AutoCraftingManager
} }
else if (obj instanceof ArrayList) else if (obj instanceof ArrayList)
{ {
/** /** Look for various possible ingredients of the same item and try to match it. */
* Look for various possible ingredients of the same item and try to match it.
*/
ArrayList ingredientsList = (ArrayList) obj; ArrayList ingredientsList = (ArrayList) obj;
Object[] ingredientsArray = ingredientsList.toArray(); Object[] ingredientsArray = ingredientsList.toArray();
@ -248,13 +230,11 @@ public class AutoCraftingManager
return null; return null;
} }
/** /** Decreases the stack by a set amount
* Decreases the stack by a set amount
* *
* @param stack - starting stack * @param stack - starting stack
* @param amount - amount of items * @param amount - amount of items
* @return the edited stack * @return the edited stack */
*/
public static ItemStack decrStackSize(ItemStack stack, int amount) public static ItemStack decrStackSize(ItemStack stack, int amount)
{ {
if (stack != null) if (stack != null)
@ -281,14 +261,12 @@ public class AutoCraftingManager
} }
} }
/** /** Checks if an item exist within the inv array
* Checks if an item exist within the inv array
* *
* @param recipeItem - itemstack being searched for * @param recipeItem - itemstack being searched for
* @param containingItems - inv array containing the search bounds * @param containingItems - inv array containing the search bounds
* @return the point in the array the item was found -1 = the item was null or not valid -2 = * @return the point in the array the item was found -1 = the item was null or not valid -2 =
* the item was not found * the item was not found */
*/
private int doesItemExist(ItemStack recipeItem, ItemStack[] containingItems) private int doesItemExist(ItemStack recipeItem, ItemStack[] containingItems)
{ {
if (recipeItem == null || recipeItem.itemID == 0 || recipeItem.stackSize <= 0) if (recipeItem == null || recipeItem.itemID == 0 || recipeItem.stackSize <= 0)
@ -314,8 +292,7 @@ public class AutoCraftingManager
return -2; return -2;
} }
/** /** Checks if itemstack are equal based on crafting result rather than normal itemstack this is
* Checks if itemstack are equal based on crafting result rather than normal itemstack this is
* done so that if the itemstack returns with * done so that if the itemstack returns with
* *
* @param recipeItem - itemstack being compared * @param recipeItem - itemstack being compared
@ -326,11 +303,10 @@ public class AutoCraftingManager
* status * status
* *
* If the item's meta data is not normal or in other words equals 32767 the meta data will be * If the item's meta data is not normal or in other words equals 32767 the meta data will be
* ignored * ignored */
*/
public static boolean areStacksEqual(ItemStack recipeItem, ItemStack checkStack) public static boolean areStacksEqual(ItemStack recipeItem, ItemStack checkStack)
{ {
if(recipeItem == null || checkStack == null) if (recipeItem == null || checkStack == null)
{ {
return false; return false;
} }
@ -345,27 +321,25 @@ public class AutoCraftingManager
return recipeItem.isItemEqual(checkStack); return recipeItem.isItemEqual(checkStack);
} }
/** /** Consumes an item checking for extra conditions like container items
* Consumes an item checking for extra conditions like container items
* *
* @param stack - starting itemStack * @param stack - starting itemStack
* @param ammount - amount to consume * @param ammount - amount to consume
* @return what is left of the itemStack if any * @return what is left of the itemStack if any */
*/
public static ItemStack consumeItem(ItemStack itemStack, int amount) public static ItemStack consumeItem(ItemStack itemStack, int amount)
{ {
if (itemStack == null) if (itemStack == null)
{ {
return null; return null;
} }
ItemStack stack = itemStack.copy(); ItemStack stack = itemStack.copy();
if (stack.getItem() instanceof ItemBucket && stack.itemID != Item.bucketEmpty.itemID) if (stack.getItem() instanceof ItemBucket && stack.itemID != Item.bucketEmpty.itemID)
{ {
return new ItemStack(Item.bucketEmpty, 1); return new ItemStack(Item.bucketEmpty, 1);
} }
if (stack.getItem().hasContainerItem()) if (stack.getItem().hasContainerItem())
{ {
ItemStack containerStack = stack.getItem().getContainerItemStack(stack); ItemStack containerStack = stack.getItem().getContainerItemStack(stack);
@ -392,11 +366,9 @@ public class AutoCraftingManager
return decrStackSize(stack, amount); return decrStackSize(stack, amount);
} }
/** /** Used to automatically remove selected items from crafting inv
* Used to automatically remove selected items from crafting inv
* *
* @param requiredItems - items that are to be removed * @param requiredItems - items that are to be removed */
*/
public void consumeItems(ItemStack... requiredItems) public void consumeItems(ItemStack... requiredItems)
{ {
if (requiredItems != null) if (requiredItems != null)

View file

@ -1,4 +1,4 @@
package dark.helpers; package dark.core.helpers;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -7,16 +7,14 @@ import universalelectricity.core.vector.Vector3;
public class ConnectionHelper public class ConnectionHelper
{ {
/** /** Used to find all tileEntities sounding the location you will have to filter for selective
* Used to find all tileEntities sounding the location you will have to filter for selective
* tileEntities * tileEntities
* *
* @param world - the world being searched threw * @param world - the world being searched threw
* @param x * @param x
* @param y * @param y
* @param z * @param z
* @return an array of up to 6 tileEntities * @return an array of up to 6 tileEntities */
*/
public static TileEntity[] getSurroundingTileEntities(TileEntity ent) public static TileEntity[] getSurroundingTileEntities(TileEntity ent)
{ {
return getSurroundingTileEntities(ent.worldObj, ent.xCoord, ent.yCoord, ent.zCoord); return getSurroundingTileEntities(ent.worldObj, ent.xCoord, ent.yCoord, ent.zCoord);
@ -54,10 +52,8 @@ public class ConnectionHelper
return list; return list;
} }
/** /** Used to find which of 4 Corners this block is in a group of blocks 0 = not a corner 1-4 = a
* Used to find which of 4 Corners this block is in a group of blocks 0 = not a corner 1-4 = a * corner of some direction */
* corner of some direction
*/
public static int corner(TileEntity entity) public static int corner(TileEntity entity)
{ {
TileEntity[] en = getSurroundingTileEntities(entity.worldObj, entity.xCoord, entity.yCoord, entity.zCoord); TileEntity[] en = getSurroundingTileEntities(entity.worldObj, entity.xCoord, entity.yCoord, entity.zCoord);

View file

@ -1,4 +1,4 @@
package dark.helpers; package dark.core.helpers;
import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.Vector3;

View file

@ -1,4 +1,4 @@
package dark.helpers; package dark.core.helpers;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.world.World; import net.minecraft.world.World;

View file

@ -1,4 +1,4 @@
package dark.helpers; package dark.core.helpers;
import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;

View file

@ -0,0 +1,7 @@
package dark.core.helpers;
public interface IAutoCrafter
{
/** The slots used by the crafter for resources */
public int[] getCraftingInv();
}

View file

@ -1,4 +1,4 @@
package dark.helpers; package dark.core.helpers;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -14,32 +14,26 @@ import universalelectricity.core.vector.Vector3;
public class ItemFindingHelper public class ItemFindingHelper
{ {
/** /** gets all EntityItems in a location using a start and end point */
* gets all EntityItems in a location using a start and end point
*/
public static List<EntityItem> findAllItemIn(World world, Vector3 start, Vector3 end) public static List<EntityItem> findAllItemIn(World world, Vector3 start, Vector3 end)
{ {
return world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(start.x, start.y, start.z, end.x, end.y, end.z)); return world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(start.x, start.y, start.z, end.x, end.y, end.z));
} }
/** /** Gets all EntityItems in an area and sorts them by a list of itemStacks
* Gets all EntityItems in an area and sorts them by a list of itemStacks
* *
* @param world - world being worked in * @param world - world being worked in
* @param start - start point * @param start - start point
* @param end - end point * @param end - end point
* @param disiredItems - list of item that are being looked for * @param disiredItems - list of item that are being looked for
* @return a list of EntityItem that match the itemStacks desired * @return a list of EntityItem that match the itemStacks desired */
*/
public static List<EntityItem> findSelectItems(World world, Vector3 start, Vector3 end, List<ItemStack> disiredItems) public static List<EntityItem> findSelectItems(World world, Vector3 start, Vector3 end, List<ItemStack> disiredItems)
{ {
List<EntityItem> entityItems = ItemFindingHelper.findAllItemIn(world, start, end); List<EntityItem> entityItems = ItemFindingHelper.findAllItemIn(world, start, end);
return filterEntityItemsList(entityItems, disiredItems); return filterEntityItemsList(entityItems, disiredItems);
} }
/** /** filters an EntityItem List to a List of Items */
* filters an EntityItem List to a List of Items
*/
public static List<EntityItem> filterEntityItemsList(List<EntityItem> entityItems, List<ItemStack> disiredItems) public static List<EntityItem> filterEntityItemsList(List<EntityItem> entityItems, List<ItemStack> disiredItems)
{ {
List<EntityItem> newItemList = new ArrayList<EntityItem>(); List<EntityItem> newItemList = new ArrayList<EntityItem>();
@ -58,9 +52,7 @@ public class ItemFindingHelper
return newItemList; return newItemList;
} }
/** /** filters out EnittyItems from an Entity list */
* filters out EnittyItems from an Entity list
*/
public static List<EntityItem> filterOutEntityItems(List<Entity> entities) public static List<EntityItem> filterOutEntityItems(List<Entity> entities)
{ {
List<EntityItem> newEntityList = new ArrayList<EntityItem>(); List<EntityItem> newEntityList = new ArrayList<EntityItem>();
@ -76,13 +68,11 @@ public class ItemFindingHelper
return newEntityList; return newEntityList;
} }
/** /** filter a list of itemStack to another list of itemStacks
* filter a list of itemStack to another list of itemStacks
* *
* @param totalItems - full list of items being filtered * @param totalItems - full list of items being filtered
* @param desiredItems - list the of item that are being filtered too * @param desiredItems - list the of item that are being filtered too
* @return a list of item from the original that are wanted * @return a list of item from the original that are wanted */
*/
public static List<ItemStack> filterItems(List<ItemStack> totalItems, List<ItemStack> desiredItems) public static List<ItemStack> filterItems(List<ItemStack> totalItems, List<ItemStack> desiredItems)
{ {
List<ItemStack> newItemList = new ArrayList<ItemStack>(); List<ItemStack> newItemList = new ArrayList<ItemStack>();
@ -101,15 +91,13 @@ public class ItemFindingHelper
return newItemList; return newItemList;
} }
/** /** Drops an item stack at the exact center of the location without any velocity or random throw
* Drops an item stack at the exact center of the location without any velocity or random throw
* angle * angle
* *
* @param world - world to drop the item in * @param world - world to drop the item in
* @param x y z - location vector * @param x y z - location vector
* @param stack - itemstack to drop * @param stack - itemstack to drop
* @return if the item was spawned in the world * @return if the item was spawned in the world */
*/
public static boolean dropItemStackExact(World world, double x, double y, double z, ItemStack stack) public static boolean dropItemStackExact(World world, double x, double y, double z, ItemStack stack)
{ {
if (!world.isRemote && stack != null) if (!world.isRemote && stack != null)
@ -121,14 +109,12 @@ public class ItemFindingHelper
return false; return false;
} }
/** /** grabs all the items that the block can drop then pass them onto dropBlockAsItem_do
* grabs all the items that the block can drop then pass them onto dropBlockAsItem_do
* *
* @param world * @param world
* @param x * @param x
* @param y * @param y
* @param z * @param z */
*/
public static void dropBlockAsItem(World world, int x, int y, int z) public static void dropBlockAsItem(World world, int x, int y, int z)
{ {
if (!world.isRemote) if (!world.isRemote)

View file

@ -1,18 +1,14 @@
package dark.helpers; package dark.core.helpers;
/** /** Used by machines that only rotate to 4 directions
* Used by machines that only rotate to 4 directions
* *
* @author DarkGuardsman * * @author DarkGuardsman * */
*/
public class MetaGroup public class MetaGroup
{ {
/** /** Gets minecraft style facing direction base
* Gets minecraft style facing direction base
* *
* @param metaData - block metadata based on 4 meta rotation * @param metaData - block metadata based on 4 meta rotation
* @return 2,5,3,4 * @return 2,5,3,4 */
*/
public static int getFacingMeta(int metaData) public static int getFacingMeta(int metaData)
{ {
int meta = metaData % 4; int meta = metaData % 4;
@ -35,18 +31,16 @@ public class MetaGroup
return newMeta; return newMeta;
} }
/** /** Gets the block's group */
* Gets the block's group
*/
public static int getGrouping(int meta) public static int getGrouping(int meta)
{ {
return meta % 4; return meta % 4;
} }
/**
* Gets the starting meta of a group /** Gets the starting meta of a group
*
* @param grouping - 4 meta group base * @param grouping - 4 meta group base
* @return metadata * @return metadata */
*/
public static int getGroupStartMeta(int grouping) public static int getGroupStartMeta(int grouping)
{ {
return grouping * 4; return grouping * 4;

View file

@ -1,4 +1,4 @@
package dark.helpers; package dark.core.helpers;
public class Pair<L, R> public class Pair<L, R>
{ {

View file

@ -1,4 +1,4 @@
package dark.helpers; package dark.core.helpers;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View file

@ -1,4 +1,4 @@
package dark.helpers; package dark.core.helpers;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;

View file

@ -1,4 +1,4 @@
package dark.core.items.parts; package dark.core.items;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -6,11 +6,11 @@ import java.util.List;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import universalelectricity.prefab.ore.OreGenReplaceStone; import universalelectricity.prefab.ore.OreGenReplaceStone;
import dark.core.DarkMain; import dark.core.DarkMain;
import dark.core.recipes.RecipeManager; import dark.core.RecipeManager;
/** Class for storing materials, there icon names, sub items to be made from them or there sub ores /** Class for storing materials, there icon names, sub items to be made from them or there sub ores
* *
* *
* @author DarkGuardsman */ * @author DarkGuardsman */
public enum EnumMeterials public enum EnumMeterials
{ {

View file

@ -1,4 +1,4 @@
package dark.core.items.parts; package dark.core.items;
public enum EnumOreParts public enum EnumOreParts
{ {

View file

@ -1,4 +1,4 @@
package dark.core.items.parts; package dark.core.items;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -1,4 +1,4 @@
package dark.core.items.parts; package dark.core.items;
import java.util.List; import java.util.List;
@ -10,10 +10,9 @@ import net.minecraftforge.common.Configuration;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import dark.core.DarkMain; import dark.core.DarkMain;
import dark.core.items.ItemBasic;
/** A series of items that are derived from a basic ore block /** A series of items that are derived from a basic ore block
* *
* @author DarkGuardsman */ * @author DarkGuardsman */
public class ItemOreDirv extends ItemBasic public class ItemOreDirv extends ItemBasic
{ {

View file

@ -6,13 +6,10 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
/** /** Parts that are used for crafting higher up items and block. These parts have no use other that
* Parts that are used for crafting higher up items and block. These parts have no use other that
* crafting * crafting
* *
* @author DarkGuardsman * @author DarkGuardsman */
*
*/
public class ItemParts extends ItemBasic public class ItemParts extends ItemBasic
{ {
@ -31,7 +28,7 @@ public class ItemParts extends ItemBasic
public ItemParts(int itemID, Configuration config) public ItemParts(int itemID, Configuration config)
{ {
super(itemID, "lmPart",config); super(itemID, "lmPart", config);
this.setHasSubtypes(true); this.setHasSubtypes(true);
this.setMaxDamage(0); this.setMaxDamage(0);
this.setMaxStackSize(64); this.setMaxStackSize(64);

View file

@ -1,13 +1,11 @@
package dark.library.math; package dark.core.math;
import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.Vector3;
public class LinearAlg public class LinearAlg
{ {
/** /** @param vec - vector3 that is on the sphere
* @param vec - vector3 that is on the sphere * @return new Vector3(radius, inclination, azimuth) */
* @return new Vector3(radius, inclination, azimuth)
*/
public static Vector3 vecToSphereAngles(Vector3 vec) public static Vector3 vecToSphereAngles(Vector3 vec)
{ {
double radius = Math.sqrt((vec.x * vec.x) + (vec.y * vec.y) + (vec.z * vec.z)); double radius = Math.sqrt((vec.x * vec.x) + (vec.y * vec.y) + (vec.z * vec.z));
@ -16,14 +14,12 @@ public class LinearAlg
return new Vector3(radius, inclination, azimuth); return new Vector3(radius, inclination, azimuth);
} }
/** /** Turns radius and sphere cords into a vector3
* Turns radius and sphere cords into a vector3
* *
* @param radius - sphere radius * @param radius - sphere radius
* @param inclination - * @param inclination -
* @param azimuth * @param azimuth
* @return Vector3(x,y,z) * @return Vector3(x,y,z) */
*/
public static Vector3 sphereAnglesToVec(Double radius, Double inclination, Double azimuth) public static Vector3 sphereAnglesToVec(Double radius, Double inclination, Double azimuth)
{ {
double x = radius * Math.sin(inclination) * Math.cos(azimuth); double x = radius * Math.sin(inclination) * Math.cos(azimuth);

View file

@ -1,32 +1,28 @@
package dark.library.math; package dark.core.math;
import java.util.Random; import java.util.Random;
public class MathHelper public class MathHelper
{ {
/** /** Generates an array of random numbers
* Generates an array of random numbers
* *
* @param random - random instance to be used * @param random - random instance to be used
* @param maxNumber - max size of the int to use * @param maxNumber - max size of the int to use
* @param arraySize - length of the array * @param arraySize - length of the array
* @return array of random numbers * @return array of random numbers */
*/
public static int[] generateRandomIntArray(Random random, int maxNumber, int arraySize) public static int[] generateRandomIntArray(Random random, int maxNumber, int arraySize)
{ {
return MathHelper.generateRandomIntArray(random, 0, maxNumber, arraySize); return MathHelper.generateRandomIntArray(random, 0, maxNumber, arraySize);
} }
/** /** Generates an array of random numbers
* Generates an array of random numbers
* *
* @param random - random instance to be used * @param random - random instance to be used
* @param minNumber - smallest random Integer to use. Warning can lead to longer than normal * @param minNumber - smallest random Integer to use. Warning can lead to longer than normal
* delay in returns * delay in returns
* @param maxNumber - max size of the int to use * @param maxNumber - max size of the int to use
* @param arraySize - length of the array * @param arraySize - length of the array
* @return array of random numbers * @return array of random numbers */
*/
public static int[] generateRandomIntArray(Random random, int minNumber, int maxNumber, int arraySize) public static int[] generateRandomIntArray(Random random, int minNumber, int maxNumber, int arraySize)
{ {
int[] array = new int[arraySize]; int[] array = new int[arraySize];

View file

@ -1,4 +1,4 @@
package dark.library.math; package dark.core.math;
public class Matrix4 public class Matrix4
{ {

View file

@ -1,14 +1,11 @@
package dark.library.math; package dark.core.math;
import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.Vector3;
/** /** This code is converted from C code to java based off of this tutorial
* This code is converted from C code to java based off of this tutorial
* http://content.gpwiki.org/index.php/OpenGL:Tutorials:Using_Quaternions_to_represent_rotation * http://content.gpwiki.org/index.php/OpenGL:Tutorials:Using_Quaternions_to_represent_rotation
* *
* @author DarkGuardsman * @author DarkGuardsman */
*
*/
public class Quaternion public class Quaternion
{ {
public static final float TOLERANCE = 0.00001f; public static final float TOLERANCE = 0.00001f;
@ -48,9 +45,7 @@ public class Quaternion
this.w = w; this.w = w;
} }
/** /** Normalizes the Quaternion only if its outside the min errors range */
* Normalizes the Quaternion only if its outside the min errors range
*/
public void normalise() public void normalise()
{ {
// Don't normalize if we don't have to // Don't normalize if we don't have to
@ -65,9 +60,7 @@ public class Quaternion
} }
} }
/** /** Gets the inverse of this Quaternion */
* Gets the inverse of this Quaternion
*/
public Quaternion getConj() public Quaternion getConj()
{ {
return new Quaternion(-x, -y, -z, w); return new Quaternion(-x, -y, -z, w);
@ -80,9 +73,7 @@ public class Quaternion
z = -z; z = -z;
} }
/** /** Multiplying q1 with q2 applies the rotation q2 to q1 */
* Multiplying q1 with q2 applies the rotation q2 to q1
* */
public Quaternion multi(Quaternion rq) public Quaternion multi(Quaternion rq)
{ {
return new Quaternion(w * rq.x + x * rq.w + y * rq.z - z * rq.y, w * rq.y + y * rq.w + z * rq.x - x * rq.z, w * rq.z + z * rq.w + x * rq.y - y * rq.x, w * rq.w - x * rq.x - y * rq.y - z * rq.z); return new Quaternion(w * rq.x + x * rq.w + y * rq.z - z * rq.y, w * rq.y + y * rq.w + z * rq.x - x * rq.z, w * rq.z + z * rq.w + x * rq.y - y * rq.x, w * rq.w - x * rq.x - y * rq.y - z * rq.z);
@ -94,9 +85,7 @@ public class Quaternion
this.set(temp); this.set(temp);
} }
/** /** Multi a vector against this in other words applying rotation */
* Multi a vector against this in other words applying rotation
*/
public Vector3 multi(Vector3 vec) public Vector3 multi(Vector3 vec)
{ {
Vector3 vn = vec.clone(); Vector3 vn = vec.clone();

View file

@ -1,5 +1,4 @@
package dark.prefab.machine.terminal; package dark.core.terminal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View file

@ -1,25 +1,18 @@
package dark.prefab.machine.terminal; package dark.core.terminal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import dark.api.ITerminal; import dark.api.ITerminal;
/**
* /** @author Calclavia, DarkGuardsman */
* @author Calclavia, DarkGuardsman
*
*/
public class CommandRegistry public class CommandRegistry
{ {
public static final List<TerminalCommand> COMMANDS = new ArrayList<TerminalCommand>(); public static final List<TerminalCommand> COMMANDS = new ArrayList<TerminalCommand>();
/** /** @param prefix - what the command starts with for example /time
* * @param cmd - Cmd instance that will execute the command */
* @param prefix - what the command starts with for example /time
* @param cmd - Cmd instance that will execute the command
*/
public static void register(TerminalCommand cmd) public static void register(TerminalCommand cmd)
{ {
if (!COMMANDS.contains(cmd)) if (!COMMANDS.contains(cmd))
@ -28,11 +21,9 @@ public class CommandRegistry
} }
} }
/** /** When a player uses a command in any CMD machine it pass threw here first
* When a player uses a command in any CMD machine it pass threw here first
* *
* @param terminal - The terminal, can be cast to TileEntity. * @param terminal - The terminal, can be cast to TileEntity. */
*/
public static void onCommand(EntityPlayer player, ITerminal terminal, String cmd) public static void onCommand(EntityPlayer player, ITerminal terminal, String cmd)
{ {
if (cmd != null && cmd != "") if (cmd != null && cmd != "")

View file

@ -1,4 +1,4 @@
package dark.prefab.machine.terminal; package dark.core.terminal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -6,7 +6,7 @@ import java.util.List;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import dark.api.ISpecialAccess; import dark.api.ISpecialAccess;
import dark.api.ITerminal; import dark.api.ITerminal;
import dark.library.access.AccessLevel; import dark.core.access.AccessLevel;
public class CommandUser extends TerminalCommand public class CommandUser extends TerminalCommand
{ {

View file

@ -1,4 +1,4 @@
package dark.prefab.machine.terminal; package dark.core.terminal;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;

View file

@ -1,61 +1,45 @@
package dark.prefab.machine.terminal; package dark.core.terminal;
import java.util.List; import java.util.List;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import dark.api.ISpecialAccess; import dark.api.ISpecialAccess;
import dark.api.ITerminal; import dark.api.ITerminal;
/**
* /** @author Calclavia, DarkGuardsman */
* @author Calclavia, DarkGuardsman
*
*/
public abstract class TerminalCommand public abstract class TerminalCommand
{ {
/** /** what the commands starts with /help /time /day
* what the commands starts with /help /time /day
* *
* @return * @return */
*/
public abstract String getCommandPrefix(); public abstract String getCommandPrefix();
/** /** Executes the command
* Executes the command
* *
* @param var1 * @param var1
* @param args * @param args */
*/
public abstract boolean processCommand(EntityPlayer player, ITerminal terminal, String[] args); public abstract boolean processCommand(EntityPlayer player, ITerminal terminal, String[] args);
/** /** Returns true if the given command sender is allowed to use this command. */
* Returns true if the given command sender is allowed to use this command.
*/
public abstract boolean canPlayerUse(EntityPlayer player, ISpecialAccess specialAccess); public abstract boolean canPlayerUse(EntityPlayer player, ISpecialAccess specialAccess);
/** /** should this command show on /help
* should this command show on /help
* *
* @param player - used to find if it should show * @param player - used to find if it should show
* @return true/false * @return true/false */
*/
public abstract boolean showOnHelp(EntityPlayer player, ISpecialAccess specialAccess); public abstract boolean showOnHelp(EntityPlayer player, ISpecialAccess specialAccess);
/** /** returns the list of commands that the player can view on /help keep it shorter than 22 chars
* returns the list of commands that the player can view on /help keep it shorter than 22 chars
* to fit on Cmd Gui * to fit on Cmd Gui
* *
* @param player * @param player
* @return * @return */
*/
public abstract List<String> getCmdUses(EntityPlayer player, ISpecialAccess specialAccess); public abstract List<String> getCmdUses(EntityPlayer player, ISpecialAccess specialAccess);
/** /** some cmds can only be use on some machines but will be access by all machines. to prevent the
* some cmds can only be use on some machines but will be access by all machines. to prevent the
* cmd from activating on the machine return false * cmd from activating on the machine return false
* *
* @param mm * @param mm
* @return * @return */
*/
public abstract boolean canMachineUse(ISpecialAccess specialAccess); public abstract boolean canMachineUse(ISpecialAccess specialAccess);
} }

View file

@ -1,4 +1,4 @@
package dark.prefab.machine.terminal; package dark.core.terminal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
@ -22,9 +22,9 @@ import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;
import dark.api.ISpecialAccess; import dark.api.ISpecialAccess;
import dark.api.ITerminal; import dark.api.ITerminal;
import dark.library.access.AccessLevel; import dark.core.access.AccessLevel;
import dark.library.access.UserAccess; import dark.core.access.UserAccess;
import dark.prefab.machine.TileEntityMachine; import dark.core.blocks.TileEntityMachine;
/** @author Calclavia, DarkGuardsman */ /** @author Calclavia, DarkGuardsman */
public abstract class TileEntityTerminal extends TileEntityMachine implements ISpecialAccess, IPacketReceiver, ITerminal public abstract class TileEntityTerminal extends TileEntityMachine implements ISpecialAccess, IPacketReceiver, ITerminal

View file

@ -6,7 +6,7 @@ import dark.api.INetworkPart;
/** Used for tile networks that only need to share power or act like a group battery that doesn't /** Used for tile networks that only need to share power or act like a group battery that doesn't
* store power on world save * store power on world save
* *
* @author DarkGuardsman */ * @author DarkGuardsman */
public class NetworkSharedPower extends NetworkTileEntities public class NetworkSharedPower extends NetworkTileEntities
{ {

View file

@ -13,7 +13,7 @@ import universalelectricity.core.vector.Vector3;
import universalelectricity.core.vector.VectorHelper; import universalelectricity.core.vector.VectorHelper;
import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.FMLLog;
import dark.api.INetworkPart; import dark.api.INetworkPart;
import dark.helpers.ConnectionHelper; import dark.core.helpers.ConnectionHelper;
public abstract class NetworkTileEntities public abstract class NetworkTileEntities
{ {
@ -27,13 +27,13 @@ public abstract class NetworkTileEntities
/** Creates a new instance of this network to be used to merge or split networks while still /** Creates a new instance of this network to be used to merge or split networks while still
* maintaining each class that extends the base network class * maintaining each class that extends the base network class
* *
* @return - new network instance using the current networks properties */ * @return - new network instance using the current networks properties */
public abstract NetworkTileEntities newInstance(); public abstract NetworkTileEntities newInstance();
/** Adds a TileEntity to the network. extends this to catch non-network parts and add them to /** Adds a TileEntity to the network. extends this to catch non-network parts and add them to
* other tile lists * other tile lists
* *
* @param tileEntity - tileEntity instance * @param tileEntity - tileEntity instance
* @param member - add to network member list * @param member - add to network member list
* @return */ * @return */
@ -129,7 +129,7 @@ public abstract class NetworkTileEntities
/** Combines two networks together into one. Calls to preMerge and doMerge instead of doing the /** Combines two networks together into one. Calls to preMerge and doMerge instead of doing the
* merge process itself * merge process itself
* *
* @param network * @param network
* @param part */ * @param part */
public void merge(NetworkTileEntities network, INetworkPart part) public void merge(NetworkTileEntities network, INetworkPart part)
@ -147,17 +147,17 @@ public abstract class NetworkTileEntities
/** Processing that needs too be done before the network merges. Use this to do final network /** Processing that needs too be done before the network merges. Use this to do final network
* merge calculations and to cause network merge failure * merge calculations and to cause network merge failure
* *
* @param network the network that is to merge with this one * @param network the network that is to merge with this one
* @param part the part at which started the network merge. Use this to cause damage if two * @param part the part at which started the network merge. Use this to cause damage if two
* networks merge with real world style failures * networks merge with real world style failures
* *
* @return false if the merge needs to be canceled. * @return false if the merge needs to be canceled.
* *
* Cases in which the network should fail to merge are were the two networks merge with error. * Cases in which the network should fail to merge are were the two networks merge with error.
* Or, in the case of pipes the two networks merge and the merge point was destroyed by * Or, in the case of pipes the two networks merge and the merge point was destroyed by
* combination of liquids. * combination of liquids.
* *
* Ex Lava and water */ * Ex Lava and water */
public boolean preMergeProcessing(NetworkTileEntities network, INetworkPart part) public boolean preMergeProcessing(NetworkTileEntities network, INetworkPart part)
{ {
@ -249,7 +249,7 @@ public abstract class NetworkTileEntities
} }
/** invalidates/remove a tile from the networks that surround and connect to it /** invalidates/remove a tile from the networks that surround and connect to it
* *
* @param tileEntity - tile */ * @param tileEntity - tile */
public static void invalidate(TileEntity tileEntity) public static void invalidate(TileEntity tileEntity)
{ {

View file

@ -1,12 +0,0 @@
package dark.library.gui;
/**
* Add this to a container class if using WatchedSlot to trigger the container on slot change
*/
public interface ISlotWatcher
{
/**
* Will trigger if the watched slot has changed
*/
public void slotContentsChanged(int slot);
}

View file

@ -1,27 +0,0 @@
package dark.library.saving;
import net.minecraft.nbt.NBTTagCompound;
/**
* Classes the register to need saving on world save use this
*
* @author DarkGuardsman
*
*/
public interface INbtSave
{
/**
* gets the file name to save as
*/
public String saveFileName();
/**
* the data to save when saving to the file
*/
public NBTTagCompound getSaveData();
/**
* can the file be saved at this moment
*/
public boolean shouldSave(boolean isServer);
}

View file

@ -1,9 +0,0 @@
package dark.prefab.machine;
public interface IAutoCrafter
{
/**
* The slots used by the crafter for resources
*/
public int[] getCraftingInv();
}

View file

@ -1,17 +0,0 @@
package dark.prefab.machine;
import net.minecraft.entity.player.EntityPlayer;
/**
* A general interface to be implemented by anything that needs it.
*
* @author Calclavia
*
*/
public interface IBlockActivate
{
/**
* Called when activated
*/
public boolean onActivated(EntityPlayer entityPlayer);
}

View file

@ -1,7 +1,7 @@
package dark.transmit.laser; package dark.transmit.laser;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import dark.prefab.machine.TileEntityMachine; import dark.core.blocks.TileEntityMachine;
public class TileEntityLaserEmitter extends TileEntityMachine public class TileEntityLaserEmitter extends TileEntityMachine
{ {