Auto-Sync
This commit is contained in:
parent
3793f44c4f
commit
4537211850
32 changed files with 95 additions and 90 deletions
|
@ -4,7 +4,7 @@ package com.builtbroken.common.science;
|
|||
* parts but each element should have a listed names, symbol, and atomic mass. Atomic number should
|
||||
* be the placement # in the list. Var ZERO should not be used as its designed to offset the
|
||||
* placement of all elements by one. As well is returned instead of null.
|
||||
*
|
||||
*
|
||||
* @Source http://www.periodictable.com/Properties/A/SpecificHeat.an.html
|
||||
* @source http://www.chemicalelements.com/
|
||||
* @source http://www.lenntech.com/periodic/periodic-chart.htm
|
||||
|
|
|
@ -2,23 +2,24 @@ package com.builtbroken.common.science;
|
|||
|
||||
/** Used to store values related to temperature and heat of a material. Temperatures are in kelvin,
|
||||
* and heat in joules
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class HeatingData
|
||||
{
|
||||
/**(K) temperature kelvin that this material goes from solid to liquid, or back */
|
||||
/** (K) temperature kelvin that this material goes from solid to liquid, or back */
|
||||
public float meltingPoint;
|
||||
/**(K) temperature kelvin that this material goes from liquid to gas, or back */
|
||||
/** (K) temperature kelvin that this material goes from liquid to gas, or back */
|
||||
public float boilingPoint;
|
||||
/**(kJ/mol) Energy per gram needed to make the final leap from solid to liquid */
|
||||
/** (kJ/mol) Energy per gram needed to make the final leap from solid to liquid */
|
||||
public float fisionHeat;
|
||||
/**(kJ/mol) Energy per gram needed to make the final leap from liquid to gas */
|
||||
/** (kJ/mol) Energy per gram needed to make the final leap from liquid to gas */
|
||||
public float vaporHeat;
|
||||
/** (j/kg K) Rate at which the material heats at in its default matter stage. This does change per phase */
|
||||
/** (j/kg K) Rate at which the material heats at in its default matter stage. This does change
|
||||
* per phase */
|
||||
public float specificHeat;
|
||||
/** How much the material expands */
|
||||
public float thermalExpasion;
|
||||
/**(W/(m K)) How well does the material conduct heat */
|
||||
/** (W/(m K)) How well does the material conduct heat */
|
||||
public float thermalConductivity;
|
||||
|
||||
public HeatingData(float meltingPoint, float boilingPoint, float fisionHeat, float vaporHeat, float specificHeat)
|
||||
|
|
|
@ -40,7 +40,7 @@ public enum ColorCode
|
|||
}
|
||||
|
||||
/** gets a ColorCode from any of the following
|
||||
*
|
||||
*
|
||||
* @param obj - Integer,String,LiquidData,ColorCode
|
||||
* @return Color NONE if it can't find it */
|
||||
public static ColorCode get(Object obj)
|
||||
|
|
|
@ -11,7 +11,7 @@ import com.builtbroken.common.science.ChemElement;
|
|||
|
||||
/** Information about blocks not provided by minecraft such as density, mass, volume, heating values,
|
||||
* chemical properties, etc etc
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class ExtraBlockData
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ public class ExtraBlockData
|
|||
}
|
||||
|
||||
/** Returns a temp at the given location in kelvin
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* @param vec
|
||||
* @return */
|
||||
|
|
|
@ -4,19 +4,19 @@ 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
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public interface IHeatObject extends ITileConnector
|
||||
{
|
||||
|
||||
/** Amount of heat stored in the body of the object. Think of it as a battery for heat but
|
||||
* remember that heat should be lost rather than keep over time.
|
||||
*
|
||||
*
|
||||
* @return amount of heat in generic units */
|
||||
public float getHeat(ForgeDirection side);
|
||||
|
||||
/** Sets the heat level of the object or increases it
|
||||
*
|
||||
*
|
||||
* @param amount - amount to set or increase by. Can be neg to indicate a lose of heat
|
||||
* @param incrase - true if should increase the current heat level */
|
||||
public void setHeat(double amount, boolean incrase);
|
||||
|
|
|
@ -28,7 +28,7 @@ public class FluidMasterList
|
|||
}
|
||||
|
||||
/** Registers a fluid, by fluid name, as a molten fluids so pipes will interact with it different
|
||||
*
|
||||
*
|
||||
* @param name - fluid name
|
||||
* @param heatValue - temperature of the fluid */
|
||||
public static void registerMoltenFluid(String name, float heatValue)
|
||||
|
@ -41,7 +41,7 @@ public class FluidMasterList
|
|||
|
||||
/** Try to only register very simple items as a reverse recipe system will be used to get to the
|
||||
* items used to craft the object
|
||||
*
|
||||
*
|
||||
* @param id - item id
|
||||
* @param meta - item meta
|
||||
* @param stack - fluid stack to return */
|
||||
|
|
|
@ -26,7 +26,7 @@ public class AssemblyObjectManager
|
|||
{
|
||||
IAssemblyRecipe re = null;
|
||||
|
||||
if(re instanceof IAssemblyObject)
|
||||
if (re instanceof IAssemblyObject)
|
||||
{
|
||||
re = ((IAssemblyObject) object).getRecipe(object);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class AssemblyObjectManager
|
|||
if (re == null && object instanceof ItemStack)
|
||||
{
|
||||
re = itemRecipes.get(new Pair<Integer, Integer>(((ItemStack) object).itemID, ((ItemStack) object).getItemDamage()));
|
||||
if(re == null && ((ItemStack) object).getItem() instanceof IAssemblyObject)
|
||||
if (re == null && ((ItemStack) object).getItem() instanceof IAssemblyObject)
|
||||
{
|
||||
re = ((IAssemblyObject) ((ItemStack) object).getItem()).getRecipe(object);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package dark.api.reciepes;
|
|||
/** Machine or entity that is creating a AssemblyObject. Avoid actually storing the recipe item if
|
||||
* there is one. Instead do what a few other mods do an give the illusion of the recipe being
|
||||
* imprinted into the machine while letting the player keep the item
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public interface IAssemblier
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ public interface IAssemblier
|
|||
|
||||
/** Checks if the recipe can be created by this assembler. Should be used in cases were an
|
||||
* assembler is designed for one task type
|
||||
*
|
||||
*
|
||||
* @param assembler - this, used in the case that an item is the assembler, or even a block
|
||||
* without a tileEntiy. Eg a Workbench is an example of this as it has no tileEntiy but supports
|
||||
* crafting
|
||||
|
|
|
@ -2,7 +2,7 @@ package dark.api.reciepes;
|
|||
|
||||
/** Applied to objects that are not complete and are being constructed from parts slowly. Used mainly
|
||||
* with assembly line armbots to create large objects like rockets automatically.
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public interface IAssemblyObject
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.item.ItemStack;
|
|||
/** WIP feature to allow an item/block to be slowly built one step at a time. Object can be an
|
||||
* ItemStack, Entity, or even an object just for this purpose. Though if its not world based you'll
|
||||
* need to inform the assembler that it exists
|
||||
*
|
||||
*
|
||||
* @author Darkgaurdsman */
|
||||
public interface IAssemblyRecipe
|
||||
{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package dark.api.reciepes;
|
||||
|
||||
/** Advanced version of the assemblyRecipe. This is also used to display the recipe like a blueprint
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public interface IBlueprint extends IAssemblyRecipe
|
||||
{
|
||||
/** Check if the blueprint can be used by the object
|
||||
*
|
||||
*
|
||||
* @param object - player, assembler,drone, entity, block, tileEntity
|
||||
* @return true if it can be used. This is mainly used for disabling recipes for players */
|
||||
public boolean canUseBlueprint(Object object);
|
||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraftforge.fluids.FluidStack;
|
|||
|
||||
/** Items that are used as molds by the mold-injector to create items from liquid materials. Eg iron
|
||||
* armor from molten iron fluid
|
||||
*
|
||||
*
|
||||
* @author Darkguardsman */
|
||||
public interface IInjectorMold
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.item.ItemStack;
|
|||
/** Simple interface that allows an item to control how its salvaged, processed, or refined by a
|
||||
* processor. This is 100% optional as the processor by default can break down most items. The only
|
||||
* reason to use this is for more complex prossesing or were the item was created with NBT.
|
||||
*
|
||||
*
|
||||
* @author Darkgaurdsman */
|
||||
public interface IProcessable
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ public interface IProcessable
|
|||
public boolean canProcess(ProcessorType type, ItemStack stack);
|
||||
|
||||
/** Gets the output array of items when this item is processed by a processor machine
|
||||
*
|
||||
*
|
||||
* @param type - type of machine see ProcessorTypes enum for info
|
||||
* @param stack - ItemStack of this item or block
|
||||
* @return Array of all item outputed, Make sure to return less than or equal to the amount of
|
||||
|
|
|
@ -21,7 +21,7 @@ import dark.core.common.items.ItemOreDirv;
|
|||
import dark.core.prefab.helpers.AutoCraftingManager;
|
||||
|
||||
/** Recipes for ore processor machines
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class MachineRecipeHandler
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ public class MachineRecipeHandler
|
|||
}
|
||||
|
||||
/** Creates a new recipe for the type of processor machine
|
||||
*
|
||||
*
|
||||
* @param type - machine type
|
||||
* @param in - input item, stacksize is ignored
|
||||
* @param out - output item */
|
||||
|
@ -63,7 +63,7 @@ public class MachineRecipeHandler
|
|||
}
|
||||
|
||||
/** Creates a new recipe for the type of processor machine
|
||||
*
|
||||
*
|
||||
* @param type - machine type
|
||||
* @param in - input item, stacksize is ignored
|
||||
* @param out - output item
|
||||
|
@ -75,7 +75,7 @@ public class MachineRecipeHandler
|
|||
}
|
||||
|
||||
/** Creates a new recipe for the type of processor machine
|
||||
*
|
||||
*
|
||||
* @param type - machine type
|
||||
* @param in - input item, stacksize is ignored
|
||||
* @param out - output item
|
||||
|
@ -171,7 +171,7 @@ public class MachineRecipeHandler
|
|||
|
||||
/** Gets the lit of items that are created from the input item stack. General this will be an
|
||||
* array of one item. However, in salavaging cases it can be up to 8 items.
|
||||
*
|
||||
*
|
||||
* @param type - Processor type
|
||||
* @param inputStack - item stack input ignores stacksize
|
||||
* @return array of itemStacks */
|
||||
|
@ -202,7 +202,7 @@ public class MachineRecipeHandler
|
|||
}
|
||||
|
||||
/** Salvages an itemStack for the items used to craft it
|
||||
*
|
||||
*
|
||||
* @param type - processor type used to determine damage results
|
||||
* @param stack - itemStack being salvaged
|
||||
* @return Array of all items salvaged */
|
||||
|
@ -212,7 +212,7 @@ public class MachineRecipeHandler
|
|||
}
|
||||
|
||||
/** Salvages an itemStack for the items used to craft it
|
||||
*
|
||||
*
|
||||
* @param type - processor type used to determine damage results
|
||||
* @param stack - itemStack being salvaged
|
||||
* @param damage - damage the output items. Eg ironIngot becomes ironDust, or ironScraps
|
||||
|
@ -240,7 +240,7 @@ public class MachineRecipeHandler
|
|||
}
|
||||
|
||||
/** Salvages an itemStack for the items used to craft it
|
||||
*
|
||||
*
|
||||
* @param stack - itemStack being salvaged
|
||||
* @param bar - chance per item that the random must be above inorder to salvage the output
|
||||
* @return Array of all items salvaged */
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package dark.api.reciepes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/** Processor Recipe output Container. Input is controlled by the processor recipes class. */
|
||||
public class ProcessorRecipe
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.builtbroken.common.Pair;
|
|||
|
||||
/** Enum of machines that support a simple A -> B processor recipe format. More complex machine will
|
||||
* have there own recipe handlers
|
||||
*
|
||||
*
|
||||
* @author Darkguardsman */
|
||||
public enum ProcessorType
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
import dark.core.prefab.helpers.AutoCraftingManager;
|
||||
|
||||
/** Recipe system to make it easier to load recipes for a mod
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public abstract class RecipeLoader
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ public abstract class RecipeLoader
|
|||
}
|
||||
|
||||
/** An easier to read recipe system for the basic minecraft recipes
|
||||
*
|
||||
*
|
||||
* @author DarkGaurdsman */
|
||||
@Deprecated
|
||||
public static class RecipeGrid
|
||||
|
@ -125,7 +125,7 @@ public abstract class RecipeLoader
|
|||
|
||||
/** 3x3 Crafting grid. Each Triple is a row. Input for the triples should be any of { Item,
|
||||
* Block, ItemStack, String}
|
||||
*
|
||||
*
|
||||
* @param one - top row
|
||||
* @param two - middle row
|
||||
* @param three - bottom row */
|
||||
|
@ -139,7 +139,7 @@ public abstract class RecipeLoader
|
|||
|
||||
/** 2x2 Crafting grid. Each Pair is a row. Input for the pairs should be any of { Item,
|
||||
* Block, ItemStack, String}
|
||||
*
|
||||
*
|
||||
* @param one - top row
|
||||
* @param two - middle row */
|
||||
public RecipeGrid(Object stack, Pair one, Pair two)
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.List;
|
|||
import net.minecraft.block.material.Material;
|
||||
|
||||
/** Enum to store tools that can be created from the material sheet.
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public enum EnumTool
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ import dark.core.common.DarkMain;
|
|||
import dark.core.prefab.ModPrefab;
|
||||
|
||||
/** Simple battery to store energy
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class ItemBattery extends ItemElectric
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ import dark.core.prefab.ModPrefab;
|
|||
|
||||
/** 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
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class ItemCommonTool extends Item implements IExtraItemInfo
|
||||
{
|
||||
|
@ -213,10 +213,10 @@ public class ItemCommonTool extends Item implements IExtraItemInfo
|
|||
for (ItemStack stack : drops)
|
||||
{
|
||||
float f = 0.7F;
|
||||
double d = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
||||
double d1 = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
||||
double d2 = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
||||
EntityItem entityitem = new EntityItem(player.worldObj, (double) x + d, (double) y + d1, (double) z + d2, stack);
|
||||
double d = (rand.nextFloat() * f) + (1.0F - f) * 0.5D;
|
||||
double d1 = (rand.nextFloat() * f) + (1.0F - f) * 0.5D;
|
||||
double d2 = (rand.nextFloat() * f) + (1.0F - f) * 0.5D;
|
||||
EntityItem entityitem = new EntityItem(player.worldObj, x + d, y + d1, z + d2, stack);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
player.worldObj.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import dark.core.prefab.items.ItemBasic;
|
|||
|
||||
/** A meta data item containing parts of various crafting recipes. These parts do not do anything but
|
||||
* allow new crafting recipes to be created.
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class ItemParts extends ItemBasic implements IExtraItemInfo
|
||||
{
|
||||
|
|
|
@ -80,6 +80,7 @@ public class BlockWire extends BlockMachine
|
|||
return this.zeroRendering ? 0 : -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, int metadata)
|
||||
{
|
||||
if (metadata == 1)
|
||||
|
|
|
@ -21,7 +21,7 @@ public class TileEntitySwitchWire extends TileEntityWire
|
|||
{
|
||||
boolean p = this.activated;
|
||||
this.activated = yes;
|
||||
if(p != this.activated)
|
||||
if (p != this.activated)
|
||||
{
|
||||
this.refresh();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
* automation. As well this is not designed to replace the need for IInventory support of a tile but
|
||||
* to make it easier to manage. Suggested use it to create a prefab manager for several tiles. Then
|
||||
* have those tiles use the prefab as an extermal inventory manager to reduce code size per class.
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public interface IInvBox extends ISidedInventory
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.builtbroken.common.Pair;
|
|||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
/** Rewrite of the imprinter crafting system into its own manageable class
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class AutoCraftingManager
|
||||
{
|
||||
|
@ -127,7 +127,7 @@ public class AutoCraftingManager
|
|||
}
|
||||
|
||||
/** Does this player's inventory contain the required resources to craft this item?
|
||||
*
|
||||
*
|
||||
* @return Required items to make the desired item. */
|
||||
public Pair<ItemStack, ItemStack[]> getIdealRecipe(ItemStack outputItem)
|
||||
{
|
||||
|
@ -261,7 +261,7 @@ public class AutoCraftingManager
|
|||
}
|
||||
|
||||
/** Gets the itemStacks in the inv based on slots
|
||||
*
|
||||
*
|
||||
* @param inv - @IInventory instance
|
||||
* @param slots - slot # to be used
|
||||
* @return array of itemStack the same size as the slots input array */
|
||||
|
@ -281,7 +281,7 @@ public class AutoCraftingManager
|
|||
}
|
||||
|
||||
/** Returns if the following inventory has the following resource required.
|
||||
*
|
||||
*
|
||||
* @param recipeItems - The items to be checked for the recipes. */
|
||||
public ArrayList<ItemStack> hasResource(Object[] recipeItems)
|
||||
{
|
||||
|
@ -369,7 +369,7 @@ public class AutoCraftingManager
|
|||
}
|
||||
|
||||
/** Decreases the stack by a set amount
|
||||
*
|
||||
*
|
||||
* @param stack - starting stack
|
||||
* @param amount - amount of items
|
||||
* @return the edited stack */
|
||||
|
@ -400,7 +400,7 @@ public class AutoCraftingManager
|
|||
}
|
||||
|
||||
/** Checks if an item exist within the inv array
|
||||
*
|
||||
*
|
||||
* @param recipeItem - itemstack being searched for
|
||||
* @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 =
|
||||
|
@ -432,14 +432,14 @@ public class AutoCraftingManager
|
|||
|
||||
/** Checks if itemstack are equal based on crafting result rather than normal itemstack this is
|
||||
* done so that if the itemstack returns with
|
||||
*
|
||||
*
|
||||
* @param recipeItem - itemstack being compared
|
||||
* @param checkStack - itemstack being comparted
|
||||
* @return true if the items are a match for each other
|
||||
*
|
||||
*
|
||||
* If the item can't be stack and is able to take damage the item will be check on damaged
|
||||
* status
|
||||
*
|
||||
*
|
||||
* If the item's meta data is not normal or in other words equals 32767 the meta data will be
|
||||
* ignored */
|
||||
public static boolean areStacksEqual(ItemStack recipeItem, ItemStack checkStack)
|
||||
|
@ -460,7 +460,7 @@ public class AutoCraftingManager
|
|||
}
|
||||
|
||||
/** Consumes an item checking for extra conditions like container items
|
||||
*
|
||||
*
|
||||
* @param stack - starting itemStack
|
||||
* @param ammount - amount to consume
|
||||
* @return what is left of the itemStack if any */
|
||||
|
@ -505,7 +505,7 @@ public class AutoCraftingManager
|
|||
}
|
||||
|
||||
/** Used to automatically remove selected items from crafting inv
|
||||
*
|
||||
*
|
||||
* @param requiredItems - items that are to be removed */
|
||||
public void consumeItems(ItemStack... requiredItems)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Gets the block's fluid if it has one
|
||||
*
|
||||
*
|
||||
* @param world - world we are working in
|
||||
* @param vector - 3D location in world
|
||||
* @return @Fluid that the block is */
|
||||
|
@ -99,10 +99,10 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Drains a block of fluid
|
||||
*
|
||||
*
|
||||
* @Note sets the block with a client update only. Doesn't tick the block allowing for better
|
||||
* placement of fluid that can flow infinitely
|
||||
*
|
||||
*
|
||||
* @param doDrain - do the action
|
||||
* @return FluidStack drained from the block */
|
||||
public static FluidStack drainBlock(World world, Vector3 node, boolean doDrain)
|
||||
|
@ -111,7 +111,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Drains a block of fluid
|
||||
*
|
||||
*
|
||||
* @param doDrain - do the action
|
||||
* @param update - block update flag to use
|
||||
* @return FluidStack drained from the block */
|
||||
|
@ -210,9 +210,9 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Helper method to fill a location with a fluid
|
||||
*
|
||||
*
|
||||
* Note: This does not update the block to prevent the liquid from flowing
|
||||
*
|
||||
*
|
||||
* @return */
|
||||
public static int fillBlock(World world, Vector3 node, FluidStack stack, boolean doFill)
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Fills all instances of IFluidHandler surrounding the origin
|
||||
*
|
||||
*
|
||||
* @param stack - FluidStack that will be filled into the tanks
|
||||
* @param doFill - Actually perform the action or simulate action
|
||||
* @param ignore - ForgeDirections to ignore
|
||||
|
@ -279,7 +279,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Fills an instance of IFluidHandler in the given direction
|
||||
*
|
||||
*
|
||||
* @param stack - FluidStack to fill the tank will
|
||||
* @param doFill - Actually perform the action or simulate action
|
||||
* @param direction - direction to fill in from the origin
|
||||
|
@ -357,7 +357,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Drains an item of fluid and fills the tank with what was drained
|
||||
*
|
||||
*
|
||||
* @param consumeItem - should it consume the item. Used mainly for creative mode players. This
|
||||
* does effect the return of the method
|
||||
* @return Item stack that would be returned if the item was drain of its fluid. Water bucket ->
|
||||
|
@ -379,7 +379,7 @@ public class FluidHelper
|
|||
}
|
||||
|
||||
/** Fills an item with fluid from the tank
|
||||
*
|
||||
*
|
||||
* @param consumeItem - should it consume the item. Used mainly for creative mode players. This
|
||||
* does effect the return of the method
|
||||
* @return Item stack that would be returned if the item was filled with fluid. empty bucket ->
|
||||
|
|
|
@ -183,18 +183,19 @@ public class InvChest implements IInvBox
|
|||
@Override
|
||||
public void onInventoryChanged()
|
||||
{
|
||||
if(this.hostTile != null){
|
||||
this.hostTile.onInventoryChanged();
|
||||
if (this.hostTile != null)
|
||||
{
|
||||
this.hostTile.onInventoryChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer)
|
||||
{
|
||||
if(this.hostTile != null)
|
||||
if (this.hostTile != null)
|
||||
{
|
||||
return this.hostTile.worldObj.getBlockTileEntity(this.hostTile.xCoord, this.hostTile.yCoord, this.hostTile.zCoord) != this.hostTile ? false : par1EntityPlayer.getDistanceSq(this.hostTile.xCoord + 0.5D, this.hostTile.yCoord + 0.5D, this.hostTile.zCoord + 0.5D) <= 64.0D;
|
||||
}
|
||||
return this.hostTile.worldObj.getBlockTileEntity(this.hostTile.xCoord, this.hostTile.yCoord, this.hostTile.zCoord) != this.hostTile ? false : par1EntityPlayer.getDistanceSq(this.hostTile.xCoord + 0.5D, this.hostTile.yCoord + 0.5D, this.hostTile.zCoord + 0.5D) <= 64.0D;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
* each mod using this create there own basic block extending this to reduce need to use build data
|
||||
* per block.
|
||||
*
|
||||
*
|
||||
* @author Darkguardsman */
|
||||
public abstract class BlockMachine extends BlockTile implements IExtraBlockInfo
|
||||
{
|
||||
|
@ -104,6 +104,7 @@ public abstract class BlockMachine extends BlockTile implements IExtraBlockInfo
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, int par5, int par6)
|
||||
{
|
||||
super.breakBlock(world, x, y, z, par5, par6);
|
||||
|
|
|
@ -20,7 +20,7 @@ import dark.core.prefab.invgui.InvChest;
|
|||
import dark.core.prefab.terminal.TerminalCommandRegistry;
|
||||
|
||||
/** Prefab for simple object who only need basic inv support and nothing more
|
||||
*
|
||||
*
|
||||
* @author Darkguardsman */
|
||||
public class TileEntityInv extends TileEntityAdvanced implements IExternalInv, ISidedInventory, ISpecialAccess
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
|
||||
/** NBT Container blocks to use that don't really need a tileEntity for anything other than to record
|
||||
* a few values
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class TileEntityNBTContainer extends TileEntity
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ public class TerminalCommandRegistry
|
|||
|
||||
/** Creates a default group for all machines to use. Only add a group if there is no option to
|
||||
* really manage the group's settings
|
||||
*
|
||||
*
|
||||
* @param name - group name
|
||||
* @param prefabGroup - group this should extend. Make sure it exists.
|
||||
* @param nodes - all commands or custom nodes */
|
||||
|
@ -61,7 +61,7 @@ public class TerminalCommandRegistry
|
|||
|
||||
/** Creates a default group for all machines to use. Only add a group if there is no option to
|
||||
* really manage the group's settings
|
||||
*
|
||||
*
|
||||
* @param name - group name
|
||||
* @param prefabGroup - group this should extend. Make sure it exists.
|
||||
* @param nodes - all commands or custom nodes */
|
||||
|
@ -136,7 +136,7 @@ public class TerminalCommandRegistry
|
|||
}
|
||||
|
||||
/** When a player uses a command in any CMD machine it pass threw here first
|
||||
*
|
||||
*
|
||||
* @param terminal - The terminal, can be cast to TileEntity. */
|
||||
public static boolean onCommand(EntityPlayer player, ITerminal terminal, String cmd)
|
||||
{
|
||||
|
|
|
@ -32,13 +32,13 @@ public abstract class NetworkTileEntities
|
|||
|
||||
/** 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
|
||||
*
|
||||
*
|
||||
* @return - new network instance using the current networks properties */
|
||||
public abstract NetworkTileEntities newInstance();
|
||||
|
||||
/** Adds a TileEntity to the network. extends this to catch non-network parts and add them to
|
||||
* other tile lists
|
||||
*
|
||||
*
|
||||
* @param tileEntity - tileEntity instance
|
||||
* @param member - add to network member list
|
||||
* @return */
|
||||
|
@ -127,7 +127,7 @@ public abstract class NetworkTileEntities
|
|||
|
||||
/** Combines two networks together into one. Calls to preMerge and doMerge instead of doing the
|
||||
* merge process itself
|
||||
*
|
||||
*
|
||||
* @param network
|
||||
* @param mergePoint */
|
||||
public void merge(NetworkTileEntities network, INetworkPart mergePoint)
|
||||
|
@ -143,17 +143,17 @@ public abstract class NetworkTileEntities
|
|||
|
||||
/** Processing that needs too be done before the network merges. Use this to do final network
|
||||
* merge calculations and to cause network merge failure
|
||||
*
|
||||
*
|
||||
* @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
|
||||
* networks merge with real world style failures
|
||||
*
|
||||
*
|
||||
* @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.
|
||||
* Or, in the case of pipes the two networks merge and the merge point was destroyed by
|
||||
* combination of liquids.
|
||||
*
|
||||
*
|
||||
* Ex Lava and water */
|
||||
public boolean preMergeProcessing(NetworkTileEntities network, INetworkPart part)
|
||||
{
|
||||
|
@ -247,7 +247,7 @@ public abstract class NetworkTileEntities
|
|||
}
|
||||
|
||||
/** invalidates/remove a tile from the networks that surround and connect to it
|
||||
*
|
||||
*
|
||||
* @param tileEntity - tile */
|
||||
public static void invalidate(TileEntity tileEntity)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue