Fixed more armbot derpiness
This commit is contained in:
parent
947d229057
commit
fb4e53eb02
5 changed files with 21 additions and 7 deletions
|
@ -188,7 +188,7 @@ public class GuiEncoder extends GuiContainer implements IInventoryWatcher
|
|||
{
|
||||
relativeCommand = i - minCommand;
|
||||
command = this.commands.get(i).toUpperCase();
|
||||
drawCommand(command, 8, 46 + relativeCommand * (fontRenderer.FONT_HEIGHT + 4), this.selCommand == i);
|
||||
drawCommand(command, 8, 47 + relativeCommand * (fontRenderer.FONT_HEIGHT + 4), this.selCommand == i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class BlockManipulator extends BlockImprintable
|
|||
public BlockManipulator(int id)
|
||||
{
|
||||
super("manipulator", id, UniversalElectricity.machine, TabAssemblyLine.INSTANCE);
|
||||
this.setBlockBounds(0, 0, 0, 1, 0.3f, 1);
|
||||
this.setBlockBounds(0, 0, 0, 1, 0.29f, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -131,13 +131,21 @@ public class TileEntityArmbot extends TileEntityAssemblyNetwork implements IMult
|
|||
|
||||
// keep it within 0 - 360 degrees so ROTATE commands work properly
|
||||
if (this.rotationPitch <= -360)
|
||||
{
|
||||
this.rotationPitch += 360;
|
||||
}
|
||||
if (this.rotationPitch >= 360)
|
||||
{
|
||||
this.rotationPitch -= 360;
|
||||
}
|
||||
if (this.rotationYaw <= -360)
|
||||
{
|
||||
this.rotationYaw += 360;
|
||||
}
|
||||
if (this.rotationYaw >= 360)
|
||||
{
|
||||
this.rotationYaw -= 360;
|
||||
}
|
||||
|
||||
this.ticksSincePower = 0;
|
||||
}
|
||||
|
@ -180,7 +188,7 @@ public class TileEntityArmbot extends TileEntityAssemblyNetwork implements IMult
|
|||
{
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
writeToNBT(nbt);
|
||||
return PacketManager.getPacket(AssemblyLine.CHANNEL, this, this.commandManager.getCurrentTask(), nbt);
|
||||
return PacketManager.getPacket(AssemblyLine.CHANNEL, this, this.powerTransferRange, this.commandManager.getCurrentTask(), nbt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -200,6 +208,7 @@ public class TileEntityArmbot extends TileEntityAssemblyNetwork implements IMult
|
|||
x = dis.readInt();
|
||||
y = dis.readInt();
|
||||
z = dis.readInt();
|
||||
this.powerTransferRange = dis.readInt();
|
||||
this.commandManager.setCurrentTask(dis.readInt());
|
||||
NBTTagCompound tag = Packet.readNBTTagCompound(dis);
|
||||
readFromNBT(tag);
|
||||
|
|
|
@ -238,13 +238,13 @@ public class BlockConveyorBelt extends BlockMachine
|
|||
if (direction.offsetX != 0)
|
||||
{
|
||||
double difference = (z + 0.5) - entity.posZ;
|
||||
entity.motionZ += difference * 0.006;
|
||||
entity.motionZ += difference * 0.06;
|
||||
// entity.posZ = z + 0.5;
|
||||
}
|
||||
else if (direction.offsetZ != 0)
|
||||
{
|
||||
double difference = (x + 0.5) - entity.posX;
|
||||
entity.motionX += difference * 0.006;
|
||||
entity.motionX += difference * 0.06;
|
||||
// /entity.posX = x + 0.5;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package assemblyline.common.machine.command;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
/**
|
||||
* Rotates the armbot to a specific direction. If not specified, it will turn right.
|
||||
|
@ -41,7 +42,7 @@ public class CommandRotate extends Command
|
|||
super.doTask();
|
||||
float rotationalDifference = Math.abs(this.tileEntity.rotationYaw - this.targetRotation);
|
||||
|
||||
if (rotationalDifference < 0.1)
|
||||
if (rotationalDifference < ROTATION_SPEED)
|
||||
{
|
||||
this.tileEntity.rotationYaw = this.targetRotation;
|
||||
}
|
||||
|
@ -55,9 +56,13 @@ public class CommandRotate extends Command
|
|||
{
|
||||
this.tileEntity.rotationYaw += ROTATION_SPEED;
|
||||
}
|
||||
this.ticks = 0;
|
||||
}
|
||||
|
||||
if (this.ticks < 80) { return true; }
|
||||
if (this.ticks < 10)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue