Edit, changes, etc..

Forgot to push while i still remember what i did and what each change
was. Guess it will due just to have it synced
This commit is contained in:
DarkGuardsman 2013-07-14 10:50:35 -04:00
parent 7a3fc461d0
commit d9a74730ab
14 changed files with 71 additions and 19 deletions

View file

@ -1,6 +1,5 @@
package dark.core; package dark.core;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.Vector3;
public enum Direction public enum Direction

View file

@ -0,0 +1,18 @@
package dark.core;
/** This class should be applied to all tile entities (mainly machines) that can be disabled (by
* things like EMP, short circuit etc.).
*
* @author Calclavia */
public interface IDisableable
{
/** This is called when the tile entity is to be disabled.
*
* @param duration - The duration of the disable in ticks. */
public void onDisable(int duration);
/** Called to see if this tile entity is disabled.
*
* @return True if the tile entity is disabled. */
public boolean isDisabled();
}

View file

@ -1,6 +1,5 @@
package dark.core.hydraulic.helpers; package dark.core.hydraulic.helpers;
import universalelectricity.core.vector.Vector3;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
@ -8,6 +7,7 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.IFluidBlock;
import universalelectricity.core.vector.Vector3;
public class FluidHelper public class FluidHelper
{ {

View file

@ -17,8 +17,8 @@ public class FluidRestrictionHandler
static static
{ {
/* ADD DEFAULT LIQUIDS */ /* ADD DEFAULT LIQUIDS */
restrictedStacks.put(ColorCode.BLUE, FluidRegistry.getFluid("Water")); restrictedStacks.put(ColorCode.BLUE, FluidRegistry.WATER);
restrictedStacks.put(ColorCode.RED, FluidRegistry.getFluid("Lava")); restrictedStacks.put(ColorCode.RED, FluidRegistry.LAVA);
} }
@ForgeSubscribe @ForgeSubscribe

View file

@ -13,9 +13,9 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.RenderBlocks;
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;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;

View file

@ -0,0 +1,40 @@
package dark.core.render;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public abstract class RenderMachine extends TileEntitySpecialRenderer
{
public RenderMachine()
{
}
@Override
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f)
{
// TODO Auto-generated method stub
}
/** Sudo method for setting the texture for current render
* @param name */
public void bindTextureByName(String domain, String name)
{
func_110628_a(new ResourceLocation(domain,name));
}
public void bindTextureByName(ResourceLocation name)
{
func_110628_a(name);
}
/** Gets the texture based on block and metadata mainly used by item/block inv render */
public abstract ResourceLocation getTexture(int block, int meta);
}

View file

@ -1,7 +1,6 @@
package dark.core.tile.network; package dark.core.tile.network;
import java.util.HashSet; import java.util.HashSet;
import java.util.List;
import java.util.Set; import java.util.Set;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;

View file

@ -8,7 +8,6 @@ import java.util.List;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.grid.IGridNetwork;
import universalelectricity.core.path.Pathfinder; import universalelectricity.core.path.Pathfinder;
import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.Vector3;
import universalelectricity.core.vector.VectorHelper; import universalelectricity.core.vector.VectorHelper;

View file

@ -5,17 +5,15 @@ import java.awt.Color;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX; import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.FMLClientHandler;
import universalelectricity.core.vector.Vector3; import universalelectricity.core.vector.Vector3;
import cpw.mods.fml.client.FMLClientHandler;
import dark.core.DarkMain; import dark.core.DarkMain;
/** /**

View file

@ -2,13 +2,12 @@ package dark.library.gui;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.resources.ResourceLocation; import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
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;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)

View file

@ -9,8 +9,8 @@ import java.util.Map.Entry;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;

View file

@ -1,9 +1,9 @@
package dark.library.machine; package dark.library.machine;
import dark.core.PowerSystems;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.electricity.ElectricityPack; import universalelectricity.core.electricity.ElectricityPack;
import buildcraft.api.power.PowerProvider; import buildcraft.api.power.PowerProvider;
import dark.core.PowerSystems;
public class BcToUeProvider extends PowerProvider public class BcToUeProvider extends PowerProvider
{ {

View file

@ -2,9 +2,10 @@ package dark.library.machine;
import java.util.Random; import java.util.Random;
import dark.core.IDisableable;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.block.IDisableable;
import universalelectricity.core.block.IElectrical; import universalelectricity.core.block.IElectrical;
import universalelectricity.core.block.IElectricalStorage; import universalelectricity.core.block.IElectricalStorage;
import universalelectricity.core.electricity.ElectricityPack; import universalelectricity.core.electricity.ElectricityPack;
@ -12,7 +13,6 @@ import universalelectricity.prefab.tile.ElectricityHandler;
import universalelectricity.prefab.tile.TileEntityAdvanced; import universalelectricity.prefab.tile.TileEntityAdvanced;
import buildcraft.api.power.IPowerProvider; import buildcraft.api.power.IPowerProvider;
import buildcraft.api.power.IPowerReceptor; import buildcraft.api.power.IPowerReceptor;
import dark.core.PowerSystems;
public abstract class TileEntityElectricMachine extends TileEntityAdvanced implements IDisableable, IElectrical, IElectricalStorage, IPowerReceptor public abstract class TileEntityElectricMachine extends TileEntityAdvanced implements IDisableable, IElectrical, IElectricalStorage, IPowerReceptor
{ {

View file

@ -29,9 +29,9 @@ import dark.library.machine.TileEntityRunnableMachine;
/** @author Calclavia, DarkGuardsman */ /** @author Calclavia, DarkGuardsman */
public abstract class TileEntityTerminal extends TileEntityRunnableMachine implements ISpecialAccess, IPacketReceiver, ITerminal public abstract class TileEntityTerminal extends TileEntityRunnableMachine implements ISpecialAccess, IPacketReceiver, ITerminal
{ {
public TileEntityTerminal(int tickEnergy) public TileEntityTerminal(float watttick)
{ {
super(tickEnergy); super(watttick);
} }
public enum PacketType public enum PacketType