Auto-Sync
This commit is contained in:
parent
1d708b9a33
commit
23f19c17a4
15 changed files with 36 additions and 43 deletions
|
@ -98,7 +98,7 @@ public class UnitHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tries to parse a value that may be anything.
|
/** Tries to parse a value that may be anything.
|
||||||
*
|
*
|
||||||
* @param var - String, Integer, Float, Double
|
* @param var - String, Integer, Float, Double
|
||||||
* @param suggestValue - Used by string parsing in case it fails and you want to return a
|
* @param suggestValue - Used by string parsing in case it fails and you want to return a
|
||||||
* default value */
|
* default value */
|
||||||
|
@ -124,7 +124,7 @@ public class UnitHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tries to parse a value that may be anything.
|
/** Tries to parse a value that may be anything.
|
||||||
*
|
*
|
||||||
* @param var - String, Integer, Float, Double */
|
* @param var - String, Integer, Float, Double */
|
||||||
public static int tryToParseInt(Object var)
|
public static int tryToParseInt(Object var)
|
||||||
{
|
{
|
||||||
|
@ -132,7 +132,7 @@ public class UnitHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tries to parse a value that may be anything.
|
/** Tries to parse a value that may be anything.
|
||||||
*
|
*
|
||||||
* @param var - String, Integer, Float, Double
|
* @param var - String, Integer, Float, Double
|
||||||
* @param suggestValue - Used by string parsing in case it fails and you want to return a
|
* @param suggestValue - Used by string parsing in case it fails and you want to return a
|
||||||
* default value */
|
* default value */
|
||||||
|
@ -158,7 +158,7 @@ public class UnitHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tries to parse a value that may be anything.
|
/** Tries to parse a value that may be anything.
|
||||||
*
|
*
|
||||||
* @param var - String, Integer, Float, Double */
|
* @param var - String, Integer, Float, Double */
|
||||||
public static Double tryToParseDouble(Object var)
|
public static Double tryToParseDouble(Object var)
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,7 @@ public class UnitHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tries to parse a value that may be anything.
|
/** Tries to parse a value that may be anything.
|
||||||
*
|
*
|
||||||
* @param var - String, Integer, Float, Double
|
* @param var - String, Integer, Float, Double
|
||||||
* @param suggestValue - Used by string parsing in case it fails and you want to return a
|
* @param suggestValue - Used by string parsing in case it fails and you want to return a
|
||||||
* default value */
|
* default value */
|
||||||
|
@ -192,7 +192,7 @@ public class UnitHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tries to parse a value that may be anything.
|
/** Tries to parse a value that may be anything.
|
||||||
*
|
*
|
||||||
* @param var - String, Integer, Float, Double
|
* @param var - String, Integer, Float, Double
|
||||||
* @return Zero if it fails to parse the value */
|
* @return Zero if it fails to parse the value */
|
||||||
public static Float tryToParseFloat(Object var)
|
public static Float tryToParseFloat(Object var)
|
||||||
|
|
|
@ -7,9 +7,9 @@ import universalelectricity.core.vector.Vector3;
|
||||||
|
|
||||||
import com.builtbroken.common.Pair;
|
import com.builtbroken.common.Pair;
|
||||||
|
|
||||||
/** Information about blocks not provided by minecraft such as density, mass, volume, heating values, chemical properties, etc
|
/** Information about blocks not provided by minecraft such as density, mass, volume, heating values,
|
||||||
* etc
|
* chemical properties, etc etc
|
||||||
*
|
*
|
||||||
* @author DarkGuardsman */
|
* @author DarkGuardsman */
|
||||||
public class ExtraBlockData
|
public class ExtraBlockData
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
package dark.api.energy;
|
package dark.api.energy;
|
||||||
|
|
||||||
import dark.api.parts.ITileConnector;
|
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
import dark.api.parts.ITileConnector;
|
||||||
|
|
||||||
/** 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 extends ITileConnector
|
public interface IHeatObject extends ITileConnector
|
||||||
{
|
{
|
||||||
|
|
||||||
/** Amount of heat stored in the body of the object. Think of it as a battery for heat but
|
/** Amount of heat stored in the body of the object. Think of it as a battery for heat but
|
||||||
* remember that heat is lost very fast
|
* remember that heat is lost very fast
|
||||||
*
|
*
|
||||||
* @return amount of heat in generic units */
|
* @return amount of heat in generic units */
|
||||||
public float getHeat(ForgeDirection side);
|
public float 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);
|
||||||
|
|
|
@ -12,7 +12,7 @@ import com.builtbroken.common.Triple;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
/** Recipe system to make it easier to load recipes for a mod
|
/** Recipe system to make it easier to load recipes for a mod
|
||||||
*
|
*
|
||||||
* @author DarkGuardsman */
|
* @author DarkGuardsman */
|
||||||
public abstract class RecipeLoader
|
public abstract class RecipeLoader
|
||||||
{
|
{
|
||||||
|
@ -97,7 +97,7 @@ public abstract class RecipeLoader
|
||||||
}
|
}
|
||||||
|
|
||||||
/** An easier to read recipe system for the basic minecraft recipes
|
/** An easier to read recipe system for the basic minecraft recipes
|
||||||
*
|
*
|
||||||
* @author DarkGaurdsman */
|
* @author DarkGaurdsman */
|
||||||
public static class RecipeGrid
|
public static class RecipeGrid
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ public abstract class RecipeLoader
|
||||||
|
|
||||||
/** 3x3 Crafting grid. Each Triple is a row. Input for the triples should be any of { Item,
|
/** 3x3 Crafting grid. Each Triple is a row. Input for the triples should be any of { Item,
|
||||||
* Block, ItemStack, String}
|
* Block, ItemStack, String}
|
||||||
*
|
*
|
||||||
* @param one - top row
|
* @param one - top row
|
||||||
* @param two - middle row
|
* @param two - middle row
|
||||||
* @param three - bottom row */
|
* @param three - bottom row */
|
||||||
|
@ -137,7 +137,7 @@ public abstract class RecipeLoader
|
||||||
|
|
||||||
/** 2x2 Crafting grid. Each Pair is a row. Input for the pairs should be any of { Item,
|
/** 2x2 Crafting grid. Each Pair is a row. Input for the pairs should be any of { Item,
|
||||||
* Block, ItemStack, String}
|
* Block, ItemStack, String}
|
||||||
*
|
*
|
||||||
* @param one - top row
|
* @param one - top row
|
||||||
* @param two - middle row */
|
* @param two - middle row */
|
||||||
public RecipeGrid(Object stack, Pair one, Pair two)
|
public RecipeGrid(Object stack, Pair one, Pair two)
|
||||||
|
|
|
@ -10,11 +10,10 @@ import net.minecraft.util.Icon;
|
||||||
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.common.CoreRecipeLoader;
|
import dark.core.common.CoreRecipeLoader;
|
||||||
import dark.core.common.DarkMain;
|
|
||||||
|
|
||||||
/** 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 EnumMaterial
|
public enum EnumMaterial
|
||||||
{
|
{
|
||||||
|
@ -74,7 +73,7 @@ public enum EnumMaterial
|
||||||
|
|
||||||
/** Creates a new item stack using material and part given. Uses a preset length of 50 for parts
|
/** Creates a new item stack using material and part given. Uses a preset length of 50 for parts
|
||||||
* enum so to prevent any unwanted changes in loading of itemStacks metadata.
|
* enum so to prevent any unwanted changes in loading of itemStacks metadata.
|
||||||
*
|
*
|
||||||
* @param mat - material
|
* @param mat - material
|
||||||
* @param part - part
|
* @param part - part
|
||||||
* @return new ItemStack created from the two enums as long as everything goes right */
|
* @return new ItemStack created from the two enums as long as everything goes right */
|
||||||
|
|
|
@ -3,8 +3,6 @@ package dark.core.common.items;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import universalelectricity.core.electricity.ElectricityDisplay;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
@ -26,6 +24,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.event.Event.Result;
|
import net.minecraftforge.event.Event.Result;
|
||||||
import net.minecraftforge.event.entity.player.UseHoeEvent;
|
import net.minecraftforge.event.entity.player.UseHoeEvent;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import universalelectricity.core.electricity.ElectricityDisplay;
|
||||||
|
|
||||||
import com.google.common.collect.Multimap;
|
import com.google.common.collect.Multimap;
|
||||||
|
|
||||||
|
@ -37,7 +36,7 @@ import dark.core.prefab.ModPrefab;
|
||||||
|
|
||||||
/** Flexible tool class that uses NBT to store damage and effect rather than metadata. Metadata
|
/** Flexible tool class that uses NBT to store damage and effect rather than metadata. Metadata
|
||||||
* instead is used to store sub items allowing several different tools to exist within the same item
|
* instead is used to store sub items allowing several different tools to exist within the same item
|
||||||
*
|
*
|
||||||
* @author DarkGuardsman */
|
* @author DarkGuardsman */
|
||||||
public class ItemCommonTool extends Item implements IExtraItemInfo
|
public class ItemCommonTool extends Item implements IExtraItemInfo
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ import dark.core.prefab.items.ItemBasic;
|
||||||
|
|
||||||
/** A meta data item containing parts of various crafting recipes. These parts do not do anything but
|
/** A meta data item containing parts of various crafting recipes. These parts do not do anything but
|
||||||
* allow new crafting recipes to be created.
|
* allow new crafting recipes to be created.
|
||||||
*
|
*
|
||||||
* @author DarkGuardsman */
|
* @author DarkGuardsman */
|
||||||
public class ItemParts extends ItemBasic
|
public class ItemParts extends ItemBasic
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,13 +4,10 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.Configuration;
|
import net.minecraftforge.common.Configuration;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import universalelectricity.prefab.block.IRotatableBlock;
|
|
||||||
import universalelectricity.prefab.tile.IRotatable;
|
|
||||||
import buildcraft.api.tools.IToolWrench;
|
import buildcraft.api.tools.IToolWrench;
|
||||||
import dark.core.common.DarkMain;
|
import dark.core.common.DarkMain;
|
||||||
import dark.core.prefab.IExtraInfo.IExtraItemInfo;
|
import dark.core.prefab.IExtraInfo.IExtraItemInfo;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import dark.api.parts.ITileConnector.Connection;
|
||||||
import dark.core.prefab.machine.TileEntityEnergyMachine;
|
import dark.core.prefab.machine.TileEntityEnergyMachine;
|
||||||
|
|
||||||
/** Machine that turns heat into usable electrical energy
|
/** Machine that turns heat into usable electrical energy
|
||||||
*
|
*
|
||||||
* @author DarkGuardsman */
|
* @author DarkGuardsman */
|
||||||
public class TileEntityHeatCouple extends TileEntityEnergyMachine
|
public class TileEntityHeatCouple extends TileEntityEnergyMachine
|
||||||
{
|
{
|
||||||
|
@ -71,6 +71,7 @@ public class TileEntityHeatCouple extends TileEntityEnergyMachine
|
||||||
return this.outputWatts;
|
return this.outputWatts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public EnumSet<ForgeDirection> getOutputDirections()
|
public EnumSet<ForgeDirection> getOutputDirections()
|
||||||
{
|
{
|
||||||
return EnumSet.allOf(ForgeDirection.class);
|
return EnumSet.allOf(ForgeDirection.class);
|
||||||
|
|
|
@ -23,11 +23,10 @@ import net.minecraft.entity.passive.EntityCow;
|
||||||
import net.minecraft.entity.passive.EntityPig;
|
import net.minecraft.entity.passive.EntityPig;
|
||||||
import net.minecraft.entity.passive.EntitySheep;
|
import net.minecraft.entity.passive.EntitySheep;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.nbt.NBTBase;
|
|
||||||
|
|
||||||
/** Dictionary to track entities by several names to be used for anything. Current use is armbot task
|
/** Dictionary to track entities by several names to be used for anything. Current use is armbot task
|
||||||
* so the user has an easy way to ID creatures.
|
* so the user has an easy way to ID creatures.
|
||||||
*
|
*
|
||||||
* @author DarkGuardsman */
|
* @author DarkGuardsman */
|
||||||
public class EntityDictionary
|
public class EntityDictionary
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import cpw.mods.fml.common.FMLLog;
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
|
||||||
/** Helper class used to work with minecraft's NBT file system.
|
/** Helper class used to work with minecraft's NBT file system.
|
||||||
*
|
*
|
||||||
* @author DarkGuardsman */
|
* @author DarkGuardsman */
|
||||||
public class NBTFileHelper
|
public class NBTFileHelper
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ public class NBTFileHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Saves an NBT file
|
/** Saves an NBT file
|
||||||
*
|
*
|
||||||
* @param file - exact File
|
* @param file - exact File
|
||||||
* @param data - nbt data
|
* @param data - nbt data
|
||||||
* @return */
|
* @return */
|
||||||
|
@ -76,7 +76,7 @@ public class NBTFileHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Uses the default world directory to save the data to file by the given name
|
/** Uses the default world directory to save the data to file by the given name
|
||||||
*
|
*
|
||||||
* @param filename - file name
|
* @param filename - file name
|
||||||
* @param data - nbt data
|
* @param data - nbt data
|
||||||
* @return true if everything goes well */
|
* @return true if everything goes well */
|
||||||
|
@ -86,7 +86,7 @@ public class NBTFileHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Reads NBT data from the world folder.
|
/** Reads NBT data from the world folder.
|
||||||
*
|
*
|
||||||
* @return The NBT data */
|
* @return The NBT data */
|
||||||
public static NBTTagCompound loadNBTFile(File saveDirectory, String filename)
|
public static NBTTagCompound loadNBTFile(File saveDirectory, String filename)
|
||||||
{
|
{
|
||||||
|
@ -114,7 +114,7 @@ public class NBTFileHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Loads an NBT file from the current world file
|
/** Loads an NBT file from the current world file
|
||||||
*
|
*
|
||||||
* @param filename - name of the file
|
* @param filename - name of the file
|
||||||
* @return NBTTagCompound that was stored in the file */
|
* @return NBTTagCompound that was stored in the file */
|
||||||
public static NBTTagCompound loadNBTFile(String filename)
|
public static NBTTagCompound loadNBTFile(String filename)
|
||||||
|
@ -150,7 +150,7 @@ public class NBTFileHelper
|
||||||
/** Used to save an object without knowing what the object is exactly. Supports most
|
/** Used to save an object without knowing what the object is exactly. Supports most
|
||||||
* NBTTagCompound save methods including some special cases. Which includes boolean being saves
|
* NBTTagCompound save methods including some special cases. Which includes boolean being saves
|
||||||
* as a string so it can be loaded as a boolean from an object save.
|
* as a string so it can be loaded as a boolean from an object save.
|
||||||
*
|
*
|
||||||
* @param tag - NBTTagCompound to save the tag too
|
* @param tag - NBTTagCompound to save the tag too
|
||||||
* @param key - name to save the object as
|
* @param key - name to save the object as
|
||||||
* @param value - the actual object
|
* @param value - the actual object
|
||||||
|
@ -230,7 +230,7 @@ public class NBTFileHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Reads an unknown object with a known name from NBT
|
/** Reads an unknown object with a known name from NBT
|
||||||
*
|
*
|
||||||
* @param tag - tag to read the value from
|
* @param tag - tag to read the value from
|
||||||
* @param key - name of the value
|
* @param key - name of the value
|
||||||
* @param suggestionValue - value to return in case nothing is found
|
* @param suggestionValue - value to return in case nothing is found
|
||||||
|
|
|
@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
import universalelectricity.core.vector.Vector2;
|
import universalelectricity.core.vector.Vector2;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ import dark.core.registration.ModObjectRegistry.BlockBuildData;
|
||||||
/** Basic TileEntity Container class designed to be used by generic machines. It is suggested that
|
/** Basic TileEntity Container class designed to be used by generic machines. It is suggested that
|
||||||
* each mod using this create there own basic block extending this to reduce need to use build data
|
* each mod using this create there own basic block extending this to reduce need to use build data
|
||||||
* per block.
|
* per block.
|
||||||
*
|
*
|
||||||
* @author Darkguardsman */
|
* @author Darkguardsman */
|
||||||
public abstract class BlockMachine extends BlockTile implements IExtraBlockInfo
|
public abstract class BlockMachine extends BlockTile implements IExtraBlockInfo
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ public class ModHelpPage
|
||||||
private static boolean init = false;
|
private static boolean init = false;
|
||||||
|
|
||||||
/** Call this to setup mod page helper for the mod
|
/** Call this to setup mod page helper for the mod
|
||||||
*
|
*
|
||||||
* @param modID - mod's id used to track it, and register all xmls too
|
* @param modID - mod's id used to track it, and register all xmls too
|
||||||
* @param configFolder - location of the mods config folder for storing player crated xmls */
|
* @param configFolder - location of the mods config folder for storing player crated xmls */
|
||||||
public static void init(String modID, String configFolder)
|
public static void init(String modID, String configFolder)
|
||||||
|
@ -33,7 +33,7 @@ public class ModHelpPage
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Call this to load an xmlFile from within the mod package
|
/** Call this to load an xmlFile from within the mod package
|
||||||
*
|
*
|
||||||
* @param modID - mod's id used to track it, and register all xmls too
|
* @param modID - mod's id used to track it, and register all xmls too
|
||||||
* @param xmlFile - path to the file */
|
* @param xmlFile - path to the file */
|
||||||
public static void load(String modID, String xmlFile)
|
public static void load(String modID, String xmlFile)
|
||||||
|
|
|
@ -62,6 +62,5 @@ public class XMLHelpFileReader
|
||||||
{
|
{
|
||||||
String name;
|
String name;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue