Auto-Sync

This commit is contained in:
DarkGuardsman 2013-11-26 00:30:07 -05:00
parent 1c3a4fd75d
commit b7e3e4beef
26 changed files with 53 additions and 121 deletions

View file

@ -7,7 +7,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
import universalelectricity.core.vector.Vector2;
import dark.api.al.coding.args.ArgumentData;
import dark.core.common.DarkMain;
/** @author DarkGuardsman */
public interface ITask extends Cloneable

View file

@ -3,8 +3,6 @@ package dark.assembly.armbot;
import java.util.List;
import java.util.Random;
import com.builtbroken.common.Pair;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -12,13 +10,14 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import universalelectricity.core.UniversalElectricity;
import universalelectricity.core.vector.Vector3;
import com.builtbroken.common.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.client.render.BlockRenderingHandler;
import dark.assembly.client.render.RenderArmbot;
import dark.assembly.client.render.RenderCrate;
import dark.assembly.machine.BlockAssembly;
import dark.assembly.machine.TileEntityCrate;
import dark.core.interfaces.IMultiBlock;
import dark.core.registration.ModObjectRegistry.BlockBuildData;
@ -73,7 +72,7 @@ public class BlockArmbot extends BlockAssembly
{
return 0;
}
@Override
@SideOnly(Side.CLIENT)
public void getClientTileEntityRenderers(List<Pair<Class<? extends TileEntity>, TileEntitySpecialRenderer>> list)

View file

@ -5,36 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.ALRecipeLoader;
import dark.assembly.CommonProxy;
import dark.assembly.armbot.TileEntityArmbot;
import dark.assembly.client.gui.GuiEncoderCoder;
import dark.assembly.client.gui.GuiEncoderHelp;
import dark.assembly.client.gui.GuiEncoderInventory;
import dark.assembly.client.gui.GuiImprinter;
import dark.assembly.client.gui.GuiProcessor;
import dark.assembly.client.render.BlockRenderingHandler;
import dark.assembly.client.render.RenderAdvancedHopper;
import dark.assembly.client.render.RenderArmbot;
import dark.assembly.client.render.RenderConveyorBelt;
import dark.assembly.client.render.RenderCrate;
import dark.assembly.client.render.RenderDetector;
import dark.assembly.client.render.RenderManipulator;
import dark.assembly.client.render.RenderProcessor;
import dark.assembly.client.render.RenderRejector;
import dark.assembly.imprinter.TileEntityImprinter;
import dark.assembly.machine.TileEntityCrate;
import dark.assembly.machine.TileEntityDetector;
import dark.assembly.machine.TileEntityManipulator;
import dark.assembly.machine.TileEntityRejector;
import dark.assembly.machine.belt.TileEntityConveyorBelt;
import dark.assembly.machine.encoder.TileEntityEncoder;
import dark.assembly.machine.processor.TileEntityProcessor;
import dark.assembly.machine.red.TileEntityAdvancedHopper;
@SideOnly(Side.CLIENT)
public class ClientProxy extends CommonProxy

View file

@ -1,6 +1,5 @@
package dark.assembly.client.gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
@ -9,7 +8,6 @@ import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.FMLClientHandler;
import dark.assembly.AssemblyLine;
import dark.assembly.machine.encoder.TileEntityEncoder;
import dark.core.client.gui.GuiMachineBase;
public class GuiEncoderCoder extends GuiEncoderBase
{
@ -45,7 +43,7 @@ public class GuiEncoderCoder extends GuiEncoderBase
super.mouseClicked(par1, par2, par3);
if (par3 == 0)
{
this.taskListGui.mousePressed(par1, par2);
this.taskListGui.mousePressed(par1, par2);
}
}

View file

@ -1,32 +1,24 @@
package dark.assembly.client.gui;
import java.awt.Color;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import universalelectricity.core.vector.Vector2;
import cpw.mods.fml.client.FMLClientHandler;
import dark.api.al.coding.ILogicTask;
import dark.api.al.coding.IProgram;
import dark.api.al.coding.IRedirectTask;
import dark.api.al.coding.ITask;
import dark.assembly.AssemblyLine;
import dark.assembly.armbot.Program;
import dark.assembly.armbot.command.TaskEnd;
import dark.assembly.armbot.command.TaskGOTO;
import dark.assembly.armbot.command.TaskGive;
import dark.assembly.armbot.command.TaskIF;
import dark.assembly.armbot.command.TaskStart;
import dark.core.common.DarkMain;
import dark.core.interfaces.IScroll;
/** Not a gui itself but a component used to display task as a box inside of a gui
*
*
* @author DarkGuardsman */
public class GuiTaskList extends Gui implements IScroll
{
@ -143,8 +135,8 @@ public class GuiTaskList extends Gui implements IScroll
System.out.println("Player clicked at " + cx + "x " + cz + "z ");
if (cx >= this.x && cz >= this.y && cx < (this.x + (20 * 7) + 10) && cz < (this.y + (20 * 6) + 10))
{
int row = (cz / 20)-4;
int col = (cx / 20)-7;
int row = (cz / 20) - 4;
int col = (cx / 20) - 7;
System.out.println("Player clicked at " + row + "r " + col + "c ");
if (this.program != null)
{

View file

@ -1,10 +1,7 @@
package dark.assembly.client.render;
import net.minecraft.block.Block;
import net.minecraft.block.BlockHopper;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IBlockAccess;

View file

@ -10,8 +10,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.AssemblyLine;
import dark.assembly.client.model.ModelAdvancedHopper;
import dark.assembly.client.model.ModelManipulator;
import dark.assembly.machine.TileEntityManipulator;
import dark.assembly.machine.red.TileEntityAdvancedHopper;
import dark.core.prefab.ModPrefab;

View file

@ -34,7 +34,7 @@ public abstract class TileEntityFilterable extends TileEntityAssembly implements
}
/** Looks through the things in the filter and finds out which item is being filtered.
*
*
* @return Is this filterable block filtering this specific ItemStack? */
public boolean isFiltering(ItemStack itemStack)
{

View file

@ -5,7 +5,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.Configuration;
import dark.assembly.AssemblyLine;
import dark.core.common.DMCreativeTab;
import dark.core.prefab.machine.BlockMachine;

View file

@ -2,8 +2,6 @@ package dark.assembly.machine;
import java.util.List;
import com.builtbroken.common.Pair;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@ -17,11 +15,13 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import universalelectricity.core.UniversalElectricity;
import com.builtbroken.common.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.AssemblyLine;
import dark.assembly.client.render.RenderCrate;
import dark.assembly.client.render.RenderManipulator;
import dark.core.registration.ModObjectRegistry.BlockBuildData;
/** A block that allows the placement of mass amount of a specific item within it. It will be allowed
@ -399,7 +399,7 @@ public class BlockCrate extends BlockAssembly
{
return metadata;
}
@Override
@SideOnly(Side.CLIENT)
public void getClientTileEntityRenderers(List<Pair<Class<? extends TileEntity>, TileEntitySpecialRenderer>> list)

View file

@ -2,8 +2,6 @@ package dark.assembly.machine;
import java.util.List;
import com.builtbroken.common.Pair;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.EntityLivingBase;
@ -16,13 +14,13 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.UniversalElectricity;
import com.builtbroken.common.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.AssemblyLine;
import dark.assembly.armbot.TileEntityArmbot;
import dark.assembly.client.render.RenderArmbot;
import dark.assembly.client.render.RenderDetector;
import dark.assembly.client.render.RenderManipulator;
import dark.assembly.imprinter.prefab.BlockImprintable;
import dark.core.registration.ModObjectRegistry.BlockBuildData;
@ -181,7 +179,7 @@ public class BlockDetector extends BlockImprintable
{
return isProvidingStrongPower(world, x, y, z, direction);
}
@Override
@SideOnly(Side.CLIENT)
public void getClientTileEntityRenderers(List<Pair<Class<? extends TileEntity>, TileEntitySpecialRenderer>> list)

View file

@ -2,8 +2,6 @@ package dark.assembly.machine;
import java.util.List;
import com.builtbroken.common.Pair;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
@ -11,17 +9,19 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatMessageComponent;
import net.minecraft.world.World;
import universalelectricity.core.UniversalElectricity;
import com.builtbroken.common.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.CommonProxy;
import dark.assembly.client.render.BlockRenderingHandler;
import dark.assembly.client.render.RenderManipulator;
import dark.assembly.client.render.RenderRejector;
import dark.assembly.imprinter.prefab.BlockImprintable;
import dark.core.registration.ModObjectRegistry.BlockBuildData;
/** A block that manipulates item movement between inventories.
*
*
* @author Calclavia, DarkGuardsman */
public class BlockManipulator extends BlockImprintable
{

View file

@ -2,22 +2,21 @@ package dark.assembly.machine;
import java.util.List;
import com.builtbroken.common.Pair;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import universalelectricity.core.UniversalElectricity;
import com.builtbroken.common.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.AssemblyLine;
import dark.assembly.client.render.BlockRenderingHandler;
import dark.assembly.client.render.RenderConveyorBelt;
import dark.assembly.client.render.RenderRejector;
import dark.assembly.imprinter.prefab.BlockImprintable;
import dark.assembly.machine.belt.TileEntityConveyorBelt;
import dark.core.registration.ModObjectRegistry.BlockBuildData;
public class BlockRejector extends BlockImprintable
@ -29,7 +28,7 @@ public class BlockRejector extends BlockImprintable
{
super(new BlockBuildData(BlockRejector.class, "rejector", UniversalElectricity.machine));
}
@Override
@SideOnly(Side.CLIENT)
public void getClientTileEntityRenderers(List<Pair<Class<? extends TileEntity>, TileEntitySpecialRenderer>> list)

View file

@ -12,8 +12,8 @@ import universalelectricity.core.block.IElectricalStorage;
import universalelectricity.core.vector.Vector3;
import dark.api.parts.INetworkEnergyPart;
import dark.api.parts.INetworkPart;
import dark.core.prefab.tilenetwork.NetworkUpdateHandler;
import dark.core.prefab.tilenetwork.NetworkSharedPower;
import dark.core.prefab.tilenetwork.NetworkUpdateHandler;
public class NetworkAssembly extends NetworkSharedPower
{

View file

@ -6,9 +6,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet250CustomPayload;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.vector.Vector3;
import universalelectricity.prefab.network.IPacketReceiver;
import com.google.common.io.ByteArrayDataInput;

View file

@ -36,14 +36,14 @@ public class BlockConveyor extends BlockAssembly
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
if (tileEntity instanceof TileEntityConveyor)
{
if (((TileEntityConveyor)tileEntity).getTileNetwork() instanceof NetworkItemSupply)
if (((TileEntityConveyor) tileEntity).getTileNetwork() instanceof NetworkItemSupply)
{
if(((NetworkItemSupply)((TileEntityConveyor)tileEntity).getTileNetwork()).isTrackingEntity(entity))
if (((TileEntityConveyor) tileEntity).getTileNetwork().isTrackingEntity(entity))
{
return;
}
}
if (((TileEntityConveyor)tileEntity).isFunctioning())
if (((TileEntityConveyor) tileEntity).isFunctioning())
{
}
}

View file

@ -2,8 +2,6 @@ package dark.assembly.machine.belt;
import java.util.List;
import com.builtbroken.common.Pair;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
@ -18,14 +16,15 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.UniversalElectricity;
import com.builtbroken.common.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.client.render.BlockRenderingHandler;
import dark.assembly.client.render.RenderConveyorBelt;
import dark.assembly.client.render.RenderProcessor;
import dark.assembly.machine.BlockAssembly;
import dark.assembly.machine.belt.TileEntityConveyorBelt.SlantType;
import dark.assembly.machine.processor.TileEntityProcessor;
import dark.core.common.DarkMain;
import dark.core.registration.ModObjectRegistry.BlockBuildData;

View file

@ -3,20 +3,17 @@ package dark.assembly.machine.belt;
import java.util.ArrayList;
import java.util.List;
import universalelectricity.core.vector.Vector3;
import universalelectricity.prefab.tile.IRotatable;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.vector.Vector3;
import dark.api.al.IBelt;
import dark.api.parts.IMotionPath;
import dark.api.parts.INetworkPart;
import dark.api.parts.ITileNetwork;
import dark.api.parts.ITileConnector.Connection;
import dark.assembly.machine.TileEntityAssembly;
import dark.assembly.machine.belt.TileEntityConveyorBelt.SlantType;
import dark.core.prefab.machine.TileEntityEnergyMachine;
import dark.core.prefab.tilenetwork.NetworkItemSupply;
@ -45,6 +42,7 @@ public class TileEntityConveyor extends TileEntityEnergyMachine implements IMoti
super(0.001f);
}
@Override
public boolean canFunction()
{
return super.canFunction() && !this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);

View file

@ -3,14 +3,15 @@ package dark.assembly.machine.frame;
import java.util.List;
import java.util.Set;
import com.builtbroken.common.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import com.builtbroken.common.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.DarkMain;
import dark.core.prefab.machine.BlockMachine;

View file

@ -1,7 +1,7 @@
package dark.assembly.machine.frame;
/** All frames, there movers, connections, and sub machines are handled by this network class
*
*
* @author DarkGuardsman */
public class NetworkFrameDesign
{

View file

@ -4,7 +4,7 @@ import dark.api.parts.INetworkPart;
import dark.core.prefab.tilenetwork.NetworkTileEntities;
/** This is a sub network for the frames that handles only one rail of frames
*
*
* @author DarkGuardsman */
public class NetworkFrameRail extends NetworkTileEntities
{

View file

@ -3,13 +3,6 @@ package dark.assembly.machine.frame;
import java.util.ArrayList;
import java.util.List;
import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet;
@ -18,6 +11,12 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.vector.Vector3;
import universalelectricity.prefab.tile.IRotatable;
import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.api.parts.INetworkPart;
import dark.api.parts.ITileNetwork;
import dark.core.common.DarkMain;
@ -28,7 +27,7 @@ import dark.core.network.PacketHandler;
/** A non-updating tileEntity that represents the logic behind the frame. It contains rotation and
* connection information. As well provides a way for a tile network to be created to provide a
* uniform existence between all frame blocks in the rail
*
*
* @author DarkGuardsman */
public class TileEntityFrame extends TileEntity implements INetworkPart, IRotatable, ISimplePacketReceiver, IBlockActivated
{

View file

@ -17,7 +17,6 @@ import universalelectricity.core.UniversalElectricity;
import com.builtbroken.common.Pair;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

View file

@ -1,34 +1,26 @@
package dark.assembly.machine.red;
import java.util.List;
import java.util.Random;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Facing;
import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import cpw.mods.fml.client.registry.ClientRegistry;
import com.builtbroken.common.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.AssemblyLine;
import dark.assembly.client.render.RenderAdvancedHopper;
import dark.core.common.DMCreativeTab;
import dark.core.common.DarkMain;
import dark.core.prefab.machine.BlockMachine;
/** Block for an advanced version of the vanilla minecraft hopper
@ -103,7 +95,7 @@ public class BlockAdvancedHopper extends BlockMachine
{
list.add(new Pair<String, Class<? extends TileEntity>>("DMTileHopper", TileEntityAdvancedHopper.class));
}
@Override
@SideOnly(Side.CLIENT)
public void getClientTileEntityRenderers(List<Pair<Class<? extends TileEntity>, TileEntitySpecialRenderer>> list)

View file

@ -5,7 +5,7 @@ import dark.core.common.DarkMain;
import dark.core.prefab.machine.BlockMachine;
/** This will be a piston that can extend from 1 - 20 depending on teir and user settings
*
*
* @author Guardsman */
public class BlockPistonPlus extends BlockMachine
{

View file

@ -2,31 +2,15 @@ package dark.assembly.machine.red;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.BlockChest;
import net.minecraft.command.IEntitySelector;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.Hopper;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Facing;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.vector.Vector3;
import dark.api.al.IManipulator;
import dark.assembly.imprinter.ItemImprinter;
import dark.assembly.imprinter.prefab.TileEntityFilterable;
import dark.assembly.machine.TileEntityManipulator;
import dark.core.helpers.InvInteractionHelper;
import dark.core.helpers.ItemWorldHelper;
import dark.core.prefab.machine.TileEntityMachine;
/** Advanced version of the hopper with features such as redstone control, sorting, filtering, and
* crate version.