Conflicts:
	src/minecraft/assemblyline/client/render/RenderArmbot.java
	src/minecraft/assemblyline/common/machine/armbot/TileEntityArmbot.java
	src/minecraft/assemblyline/common/machine/command/CommandFire.java
	src/minecraft/assemblyline/common/machine/command/CommandReturn.java
This commit is contained in:
Brian Ricketts 2013-01-25 22:09:42 -06:00
commit b5e307a2d3
20 changed files with 318 additions and 305 deletions

View file

@ -1,30 +0,0 @@
package assemblyline.api;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.Entity;
/**
* A class that allows you to ignore specific entities on the Conveyor Belt.
*
* @author Calclavia
*
*/
public class ConveyorIgnore
{
private static final List<Entity> entityIgnoreList = new ArrayList<Entity>();
public static void ignore(Entity entity)
{
if (!entityIgnoreList.contains(entity))
{
entityIgnoreList.add(entity);
}
}
public static boolean isIgnore(Entity entity)
{
return entityIgnoreList.contains(entity);
}
}

View file

@ -1,12 +1,12 @@
package assemblyline.api;
import assemblyline.common.machine.armbot.TileEntityArmbot;
import net.minecraft.entity.Entity;
import assemblyline.common.machine.armbot.TileEntityArmbot;
/**
* The IUseable inteface is used by the ArmBot so that it may interact with Tile Entities.
* onUse will be called on the block an ArmBot is touching whenver the USE command is run
* on it.
* The IUseable inteface is used by the ArmBot so that it may interact with Tile Entities. onUse
* will be called on the block an ArmBot is touching whenver the USE command is run on it.
*
* @author Briman0094
*
*/
@ -14,8 +14,9 @@ public interface IArmbotUseable
{
/**
* Called when the ArmBot command "USE" is run. This is called on any IUseable the
* ArmBot is touching.
* Called when the ArmBot command "USE" is run. This is called on any IUseable the ArmBot is
* touching.
*
* @param tileEntity the TileEntityArmbot that is using this IUseable
* @param heldEntity the Entity being held by the ArmBot, or null if there is none
* @return whether or not the "use" did anything

View file

@ -126,9 +126,28 @@ public class ModelArmbot extends ModelBase
{
/*
* armMountRight.setRotationPoint(baseRotation.rotationPointX, armMountRight.rotationPointY, baseRotation.rotationPointX); armMountLeft.setRotationPoint(baseRotation.rotationPointX, armMountLeft.rotationPointY, baseRotation.rotationPointX); armLower.setRotationPoint(baseRotation.rotationPointX, armLower.rotationPointY, baseRotation.rotationPointX); armUpper.setRotationPoint(baseRotation.rotationPointX, armUpper.rotationPointY, baseRotation.rotationPointX); baseRotation.setRotationPoint(baseRotation.rotationPointX, baseRotation.rotationPointY, baseRotation.rotationPointX); clampBody.setRotationPoint(baseRotation.rotationPointX, clampBody.rotationPointY, baseRotation.rotationPointX); clampBody2.setRotationPoint(baseRotation.rotationPointX, clampBody2.rotationPointY, baseRotation.rotationPointX); clampClawLower.setRotationPoint(baseRotation.rotationPointX, clampClawLower.rotationPointY, baseRotation.rotationPointX); clampClawLower2.setRotationPoint(baseRotation.rotationPointX, clampClawLower2.rotationPointY, baseRotation.rotationPointX);
* armMountRight.setRotationPoint(baseRotation.rotationPointX, armMountRight.rotationPointY,
* baseRotation.rotationPointX); armMountLeft.setRotationPoint(baseRotation.rotationPointX,
* armMountLeft.rotationPointY, baseRotation.rotationPointX);
* armLower.setRotationPoint(baseRotation.rotationPointX, armLower.rotationPointY,
* baseRotation.rotationPointX); armUpper.setRotationPoint(baseRotation.rotationPointX,
* armUpper.rotationPointY, baseRotation.rotationPointX);
* baseRotation.setRotationPoint(baseRotation.rotationPointX, baseRotation.rotationPointY,
* baseRotation.rotationPointX); clampBody.setRotationPoint(baseRotation.rotationPointX,
* clampBody.rotationPointY, baseRotation.rotationPointX);
* clampBody2.setRotationPoint(baseRotation.rotationPointX, clampBody2.rotationPointY,
* baseRotation.rotationPointX);
* clampClawLower.setRotationPoint(baseRotation.rotationPointX,
* clampClawLower.rotationPointY, baseRotation.rotationPointX);
* clampClawLower2.setRotationPoint(baseRotation.rotationPointX,
* clampClawLower2.rotationPointY, baseRotation.rotationPointX);
*
* armMountRight.rotateAngleY = armBot.rotationYaw; armMountLeft.rotateAngleY = armBot.rotationYaw; armLower.rotateAngleY = armBot.rotationYaw; armUpper.rotateAngleY = armBot.rotationYaw; baseRotation.rotateAngleY = armBot.rotationYaw; clampBody.rotateAngleY = armBot.rotationYaw; clampBody2.rotateAngleY = armBot.rotationYaw; clampClawLower.rotateAngleY = armBot.rotationYaw; clampClawLower2.rotateAngleY = armBot.rotationYaw;
* armMountRight.rotateAngleY = armBot.rotationYaw; armMountLeft.rotateAngleY =
* armBot.rotationYaw; armLower.rotateAngleY = armBot.rotationYaw; armUpper.rotateAngleY =
* armBot.rotationYaw; baseRotation.rotateAngleY = armBot.rotationYaw;
* clampBody.rotateAngleY = armBot.rotationYaw; clampBody2.rotateAngleY =
* armBot.rotationYaw; clampClawLower.rotateAngleY = armBot.rotationYaw;
* clampClawLower2.rotateAngleY = armBot.rotationYaw;
*/
baseTop.render(f5);

View file

@ -8,7 +8,6 @@ package assemblyline.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelRejectorPiston extends ModelBase
{

View file

@ -11,7 +11,8 @@ import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
/**
* A class to be inherited by all machines on the assembly line. This will allow all machines to be able to be powered through the powering of only one machine.
* A class to be inherited by all machines on the assembly line. This will allow all machines to be
* able to be powered through the powering of only one machine.
*
* @author Calclavia
*

View file

@ -14,6 +14,7 @@ import net.minecraftforge.common.ISidedInventory;
import universalelectricity.core.vector.Vector3;
import universalelectricity.prefab.implement.IRedstoneReceptor;
import universalelectricity.prefab.implement.IRotatable;
import universalelectricity.prefab.multiblock.TileEntityMulti;
import universalelectricity.prefab.network.PacketManager;
import assemblyline.api.IManipulator;
import assemblyline.common.machine.imprinter.TileEntityFilterable;
@ -86,7 +87,8 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
}
/**
* Find items going into the manipulator and input them into an inventory behind this manipulator.
* Find items going into the manipulator and input them into an inventory behind this
* manipulator.
*/
@Override
public void inject()
@ -110,7 +112,8 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
if (entity.isDead)
continue;
/**
* Try top first, then bottom, then the sides to see if it is possible to insert the item into a inventory.
* Try top first, then bottom, then the sides to see if it is possible to insert the
* item into a inventory.
*/
ItemStack remainingStack = entity.func_92014_d().copy();
@ -180,9 +183,16 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
}
/*
* @Override public ArrayList getPacketData() { ArrayList list = super.getPacketData(); list.add(this.isOutput); list.add(this.wattsReceived); return list; }
* @Override public ArrayList getPacketData() { ArrayList list = super.getPacketData();
* list.add(this.isOutput); list.add(this.wattsReceived); return list; }
*
* @Override public void handlePacketData(INetworkManager network, int packetType, Packet250CustomPayload packet, EntityPlayer player, ByteArrayDataInput dataStream) { if (worldObj.isRemote) { ByteArrayInputStream bis = new ByteArrayInputStream(packet.data); DataInputStream dis = new DataInputStream(bis); int id, x, y, z; try { id = dis.readInt(); x = dis.readInt(); y = dis.readInt(); z = dis.readInt(); NBTTagCompound tag = Packet.readNBTTagCompound(dis); readFromNBT(tag); this.wattsReceived = dis.readDouble(); this.isOutput = dis.readBoolean(); } catch (IOException e) { e.printStackTrace(); } } }
* @Override public void handlePacketData(INetworkManager network, int packetType,
* Packet250CustomPayload packet, EntityPlayer player, ByteArrayDataInput dataStream) { if
* (worldObj.isRemote) { ByteArrayInputStream bis = new ByteArrayInputStream(packet.data);
* DataInputStream dis = new DataInputStream(bis); int id, x, y, z; try { id = dis.readInt(); x
* = dis.readInt(); y = dis.readInt(); z = dis.readInt(); NBTTagCompound tag =
* Packet.readNBTTagCompound(dis); readFromNBT(tag); this.wattsReceived = dis.readDouble();
* this.isOutput = dis.readBoolean(); } catch (IOException e) { e.printStackTrace(); } } }
*/
/**
@ -215,7 +225,17 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
/**
* Try to put items into a chest.
*/
if (tileEntity instanceof TileEntityChest)
if (tileEntity instanceof TileEntityMulti)
{
Vector3 mainBlockPosition = ((TileEntityMulti) tileEntity).mainBlockPosition;
if (mainBlockPosition != null)
{
if (!(mainBlockPosition.getTileEntity(this.worldObj) instanceof TileEntityMulti))
return tryPlaceInPosition(itemStack, mainBlockPosition, direction);
}
}
else if (tileEntity instanceof TileEntityChest)
{
TileEntityChest[] chests = { (TileEntityChest) tileEntity, null };
@ -323,7 +343,17 @@ public class TileEntityManipulator extends TileEntityFilterable implements IRota
/**
* Try to put items into a chest.
*/
if (tileEntity instanceof TileEntityChest)
if (tileEntity instanceof TileEntityMulti)
{
Vector3 mainBlockPosition = ((TileEntityMulti) tileEntity).mainBlockPosition;
if (mainBlockPosition != null)
{
if (!(mainBlockPosition.getTileEntity(this.worldObj) instanceof TileEntityMulti))
return tryGrabFromPosition(mainBlockPosition, direction);
}
}
else if (tileEntity instanceof TileEntityChest)
{
TileEntityChest[] chests = { (TileEntityChest) tileEntity, null };

View file

@ -1,7 +1,6 @@
package assemblyline.common.machine.belt;
import java.util.List;
import java.util.Random;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
@ -68,14 +67,8 @@ public class BlockConveyorBelt extends BlockMachine
{
TileEntityConveyorBelt tileEntity = (TileEntityConveyorBelt) t;
if (tileEntity.getSlant() == SlantType.UP || tileEntity.getSlant() == SlantType.DOWN)
{
return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + 1, (double) y + 1, (double) z + 1);
}
if (tileEntity.getSlant() == SlantType.TOP)
{
return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double) x + this.minX, (double) y + 0.68f, (double) z + this.minZ, (double) x + this.maxX, (double) y + 0.98f, (double) z + this.maxZ);
}
if (tileEntity.getSlant() == SlantType.UP || tileEntity.getSlant() == SlantType.DOWN) { return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + 1, (double) y + 1, (double) z + 1); }
if (tileEntity.getSlant() == SlantType.TOP) { return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double) x + this.minX, (double) y + 0.68f, (double) z + this.minZ, (double) x + this.maxX, (double) y + 0.98f, (double) z + this.maxZ); }
}
return AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ);

View file

@ -3,7 +3,6 @@ package assemblyline.common.machine.belt;
import java.util.EnumSet;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
@ -53,7 +52,8 @@ public class TileEntityConveyorBelt extends TileEntityAssemblyNetwork implements
}
/**
* This function is overriden to allow conveyor belts to power belts that are diagonally going up.
* This function is overriden to allow conveyor belts to power belts that are diagonally going
* up.
*/
@Override
public void updatePowerTransferRange()
@ -119,8 +119,11 @@ public class TileEntityConveyorBelt extends TileEntityAssemblyNetwork implements
if (this.isRunning())
{
if (this.ticks % 10 == 0 && this.worldObj.isRemote && this.worldObj.getBlockId(xCoord - 1, yCoord, zCoord) != AssemblyLine.blockConveyorBelt.blockID && this.worldObj.getBlockId(xCoord, yCoord, zCoord - 1) != AssemblyLine.blockConveyorBelt.blockID) // sound is 0.5 seconds long (20 ticks/second)
this.worldObj.playSound(this.xCoord, this.yCoord, this.zCoord, "assemblyline.conveyor", 0.5f, 0.3f, true);
if (this.ticks % 10 == 0 && this.worldObj.isRemote && this.worldObj.getBlockId(xCoord - 1, yCoord, zCoord) != AssemblyLine.blockConveyorBelt.blockID && this.worldObj.getBlockId(xCoord, yCoord, zCoord - 1) != AssemblyLine.blockConveyorBelt.blockID)
{
// Sound is 0.5 seconds long (20 ticks/second)
this.worldObj.playSound(this.xCoord, this.yCoord, this.zCoord, "assemblyline.conveyor", 0.3f, 0.3f, true);
}
this.wheelRotation += 40;

View file

@ -1,6 +1,5 @@
package assemblyline.common.machine.command;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
@ -23,7 +22,8 @@ public class CommandDrop extends Command
entity.worldObj = this.tileEntity.worldObj;
if (entity instanceof EntityItem)
if (!world.isRemote)
world.spawnEntityInWorld(entity); // items don't move right, so we render them manually
world.spawnEntityInWorld(entity); // items don't move right, so we render
// them manually
this.world.playSound(this.tileEntity.xCoord, this.tileEntity.yCoord, this.tileEntity.zCoord, "random.pop", 0.2F, ((this.tileEntity.worldObj.rand.nextFloat() - this.tileEntity.worldObj.rand.nextFloat()) * 0.7F + 1.0F) * 1.0F, true);
}
}

View file

@ -45,11 +45,22 @@ public class CommandGrab extends Command
{
for (int i = 0; i < found.size(); i++)
{
if (found.get(i) != null && !(found.get(i) instanceof EntityPlayer) && !(found.get(i) instanceof EntityArrow) && found.get(i).ridingEntity == null) // isn't null, isn't a player, and isn't riding anything
if (found.get(i) != null && !(found.get(i) instanceof EntityPlayer) && !(found.get(i) instanceof EntityArrow) && found.get(i).ridingEntity == null) // isn't
// null,
// isn't
// a
// player,
// and
// isn't
// riding
// anything
{
this.tileEntity.grabbedEntities.add(found.get(i));
if (found.get(i) instanceof EntityItem)
this.tileEntity.worldObj.removeEntity(found.get(i)); // items don't move right, so we render them manually\
this.tileEntity.worldObj.removeEntity(found.get(i)); // items don't move
// right, so we
// render them
// manually\
this.world.playSound(this.tileEntity.xCoord, this.tileEntity.yCoord, this.tileEntity.zCoord, "random.pop", 0.2F, ((this.tileEntity.worldObj.rand.nextFloat() - this.tileEntity.worldObj.rand.nextFloat()) * 0.7F + 1.0F) * 1.0F, true);
found.get(i).isDead = false;
return false;

View file

@ -1,6 +1,5 @@
package assemblyline.common.machine.command;
public class CommandIdle extends Command
{
/**

View file

@ -6,9 +6,7 @@ import java.util.List;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import assemblyline.common.machine.armbot.TileEntityArmbot;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.relauncher.Side;
public class CommandManager
{
@ -47,7 +45,9 @@ public class CommandManager
}
// if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER)
//System.out.println("curTask: " + this.currentTask + ": " + this.tasks.get(this.currentTask).toString().substring(this.tasks.get(this.currentTask).toString().lastIndexOf('.') + 1));
// System.out.println("curTask: " + this.currentTask + ": " +
// this.tasks.get(this.currentTask).toString().substring(this.tasks.get(this.currentTask).toString().lastIndexOf('.')
// + 1));
if (!task.doTask())
{
@ -56,7 +56,8 @@ public class CommandManager
this.currentTask++;
if (!(task instanceof CommandRepeat)) // repeat needs to be persistent
{
// End the task and reinitialize it into a new class to make sure it is fresh.
// End the task and reinitialize it into a new class to make sure it is
// fresh.
this.tasks.set(tempCurrentTask, this.getNewCommand(task.tileEntity, task.getClass(), task.getArgs()));
}
}
@ -97,7 +98,8 @@ public class CommandManager
}
/**
* Used to register Tasks for a TileEntity, executes onTaskStart for the Task after registering it
* Used to register Tasks for a TileEntity, executes onTaskStart for the Task after registering
* it
*
* @param tileEntity TE instance to register the task for
* @param newCommand Task instance to register

View file

@ -1,6 +1,5 @@
package assemblyline.common.machine.command;
/**
* Rotates the armbot to a specific direction. If not specified, it will turn right.
*
@ -67,24 +66,14 @@ public class CommandRotateBy extends Command
protected boolean doTask()
{
super.doTask();
/*float rotationalDifference = Math.abs(this.tileEntity.rotationYaw - this.targetRotation);
if (rotationalDifference < ROTATION_SPEED)
{
this.tileEntity.rotationYaw = this.targetRotation;
}
else
{
if (this.tileEntity.rotationYaw > this.targetRotation)
{
this.tileEntity.rotationYaw -= ROTATION_SPEED;
}
else
{
this.tileEntity.rotationYaw += ROTATION_SPEED;
}
this.ticks = 0;
}*/
/*
* float rotationalDifference = Math.abs(this.tileEntity.rotationYaw - this.targetRotation);
*
* if (rotationalDifference < ROTATION_SPEED) { this.tileEntity.rotationYaw =
* this.targetRotation; } else { if (this.tileEntity.rotationYaw > this.targetRotation) {
* this.tileEntity.rotationYaw -= ROTATION_SPEED; } else { this.tileEntity.rotationYaw +=
* ROTATION_SPEED; } this.ticks = 0; }
*/
// set the rotation to the target immediately and let the client handle animating it
// wait for the client to catch up
@ -94,10 +83,7 @@ public class CommandRotateBy extends Command
if (Math.abs(this.tileEntity.rotationPitch - this.targetRotationPitch) > 0.001f)
this.tileEntity.rotationPitch = this.targetRotationPitch;
if (this.ticks < this.totalTicks)
{
return true;
}
if (this.ticks < this.totalTicks) { return true; }
return false;
}

View file

@ -52,10 +52,7 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
@Override
public int getSizeInventorySide(ForgeDirection side)
{
if (side == ForgeDirection.UP || side == ForgeDirection.DOWN)
{
return 1;
}
if (side == ForgeDirection.UP || side == ForgeDirection.DOWN) { return 1; }
return INVENTORY_LENGTH;
}
@ -72,7 +69,8 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
}
/**
* Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a new stack.
* Removes from an inventory slot (first arg) up to a specified number (second arg) of items and
* returns them in a new stack.
*/
@Override
public ItemStack decrStackSize(int i, int amount)
@ -106,7 +104,8 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
}
/**
* When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - like when you close a workbench GUI.
* When some containers are closed they call this on each slot, then drop whatever it returns as
* an EntityItem - like when you close a workbench GUI.
*/
@Override
public ItemStack getStackInSlotOnClosing(int slot)
@ -124,7 +123,8 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
}
/**
* Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
* Sets the given item stack to the specified slot in the inventory (can be crafting or armor
* sections).
*/
@Override
public void setInventorySlotContents(int par1, ItemStack par2ItemStack)
@ -263,17 +263,11 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
{
if (object instanceof ShapedRecipes)
{
if (this.hasResource(((ShapedRecipes) object).recipeItems) != null)
{
return new Pair<ItemStack, ItemStack[]>(((IRecipe) object).getRecipeOutput().copy(), ((ShapedRecipes) object).recipeItems);
}
if (this.hasResource(((ShapedRecipes) object).recipeItems) != null) { return new Pair<ItemStack, ItemStack[]>(((IRecipe) object).getRecipeOutput().copy(), ((ShapedRecipes) object).recipeItems); }
}
else if (object instanceof ShapelessRecipes)
{
if (this.hasResource(((ShapelessRecipes) object).recipeItems.toArray(new ItemStack[1])) != null)
{
return new Pair<ItemStack, ItemStack[]>(((IRecipe) object).getRecipeOutput().copy(), (ItemStack[]) ((ShapelessRecipes) object).recipeItems.toArray(new ItemStack[1]));
}
if (this.hasResource(((ShapelessRecipes) object).recipeItems.toArray(new ItemStack[1])) != null) { return new Pair<ItemStack, ItemStack[]>(((IRecipe) object).getRecipeOutput().copy(), (ItemStack[]) ((ShapelessRecipes) object).recipeItems.toArray(new ItemStack[1])); }
}
else if (object instanceof ShapedOreRecipe)
{
@ -282,11 +276,9 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
ArrayList<ItemStack> hasResources = this.hasResource(oreRecipeInput);
if (hasResources != null)
{
if (hasResources != null) {
return new Pair<ItemStack, ItemStack[]>(((IRecipe) object).getRecipeOutput().copy(), hasResources.toArray(new ItemStack[1]));
}
return new Pair<ItemStack, ItemStack[]>(((IRecipe) object).getRecipeOutput().copy(), hasResources.toArray(new ItemStack[1])); }
}
else if (object instanceof ShapelessOreRecipe)
{
@ -295,10 +287,7 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
List<ItemStack> hasResources = this.hasResource(oreRecipeInput.toArray());
if (hasResources != null)
{
return new Pair<ItemStack, ItemStack[]>(((IRecipe) object).getRecipeOutput().copy(), hasResources.toArray(new ItemStack[1]));
}
if (hasResources != null) { return new Pair<ItemStack, ItemStack[]>(((IRecipe) object).getRecipeOutput().copy(), hasResources.toArray(new ItemStack[1])); }
}
}
}
@ -446,7 +435,17 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
if (heldEntity instanceof EntityItem)
{
ItemStack stack = ((EntityItem) heldEntity).func_92014_d();
if (this.getStackInSlot(3) == null && stack != null && stack.itemID == AssemblyLine.itemImprint.itemID) // no crafting imprint and stack not null and stack is imprint
if (this.getStackInSlot(3) == null && stack != null && stack.itemID == AssemblyLine.itemImprint.itemID) // no
// crafting
// imprint
// and
// stack
// not
// null
// and
// stack
// is
// imprint
{
this.setInventorySlotContents(3, stack);
this.onInventoryChanged();