Updated Calclavia Core
This commit is contained in:
parent
662acb7c23
commit
b78d5d1c8e
5 changed files with 9 additions and 9 deletions
|
@ -29,7 +29,7 @@ import calclavia.lib.multiblock.link.IMultiBlock;
|
|||
import calclavia.lib.network.PacketHandler;
|
||||
import calclavia.lib.utility.HelperMethods;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
import calclavia.lib.utility.MathHelper;
|
||||
import calclavia.lib.utility.MathUtility;
|
||||
|
||||
import com.builtbroken.common.Pair;
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
@ -120,7 +120,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
|
|||
public void updateRotation()
|
||||
{
|
||||
// Clamp target angles
|
||||
this.targetYaw = (int) MathHelper.clampAngleTo360(this.targetYaw);
|
||||
this.targetYaw = (int) MathUtility.clampAngleTo360(this.targetYaw);
|
||||
if (this.targetPitch < 0)
|
||||
this.targetPitch = 0;
|
||||
if (this.targetPitch > 60)
|
||||
|
@ -179,7 +179,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
|
|||
this.playRotationSound();
|
||||
}
|
||||
// Clamp actual angles angles
|
||||
this.actualYaw = (int) MathHelper.clampAngleTo360(this.actualYaw);
|
||||
this.actualYaw = (int) MathUtility.clampAngleTo360(this.actualYaw);
|
||||
if (this.actualPitch < 0)
|
||||
this.actualPitch = 0;
|
||||
if (this.actualPitch > 60)
|
||||
|
|
|
@ -63,7 +63,7 @@ public class TaskGive extends TaskBaseArmbot
|
|||
|
||||
if (targetTile != null && ((IArmbot) this.program.getMachine()).getHeldObject() instanceof ItemStack)
|
||||
{
|
||||
ForgeDirection direction = MathHelper.getFacingDirectionFromAngle((float) ((IArmbot) this.program.getMachine()).getRotation().x);
|
||||
ForgeDirection direction = MathUtility.getFacingDirectionFromAngle((float) ((IArmbot) this.program.getMachine()).getRotation().x);
|
||||
ItemStack itemStack = (ItemStack) ((IArmbot) this.program.getMachine()).getHeldObject();
|
||||
List<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
if (this.stack != null)
|
||||
|
|
|
@ -41,8 +41,8 @@ public class TaskRotateBy extends TaskBaseArmbot
|
|||
{
|
||||
if (super.onMethodCalled() == ProcessReturn.CONTINUE)
|
||||
{
|
||||
this.targetRotationYaw = (int) MathHelper.clampAngleTo360((float) (((IArmbot) this.program.getMachine()).getRotation().x + UnitHelper.tryToParseInt(this.getArg("yaw"))));
|
||||
this.targetRotationPitch = (int) MathHelper.clampAngleTo360((float) (((IArmbot) this.program.getMachine()).getRotation().x + UnitHelper.tryToParseInt(this.getArg("pitch"))));
|
||||
this.targetRotationYaw = (int) MathUtility.clampAngleTo360((float) (((IArmbot) this.program.getMachine()).getRotation().x + UnitHelper.tryToParseInt(this.getArg("yaw"))));
|
||||
this.targetRotationPitch = (int) MathUtility.clampAngleTo360((float) (((IArmbot) this.program.getMachine()).getRotation().x + UnitHelper.tryToParseInt(this.getArg("pitch"))));
|
||||
return ProcessReturn.CONTINUE;
|
||||
}
|
||||
return ProcessReturn.GENERAL_ERROR;
|
||||
|
|
|
@ -43,8 +43,8 @@ public class TaskRotateTo extends TaskBaseArmbot
|
|||
{
|
||||
if (super.onMethodCalled() == ProcessReturn.CONTINUE)
|
||||
{
|
||||
this.targetRotationYaw = (int) MathHelper.clampAngleTo360(UnitHelper.tryToParseInt(this.getArg("yaw")));
|
||||
this.targetRotationPitch = (int) MathHelper.clampAngleTo360(UnitHelper.tryToParseInt(this.getArg("pitch")));
|
||||
this.targetRotationYaw = (int) MathUtility.clampAngleTo360(UnitHelper.tryToParseInt(this.getArg("yaw")));
|
||||
this.targetRotationPitch = (int) MathUtility.clampAngleTo360(UnitHelper.tryToParseInt(this.getArg("pitch")));
|
||||
return ProcessReturn.CONTINUE;
|
||||
}
|
||||
return ProcessReturn.GENERAL_ERROR;
|
||||
|
|
|
@ -61,7 +61,7 @@ public class TaskTake extends TaskBaseArmbot
|
|||
|
||||
if (targetTile != null && ((IArmbot) this.program.getMachine()).getHeldObject() instanceof ItemStack)
|
||||
{
|
||||
ForgeDirection direction = MathHelper.getFacingDirectionFromAngle(((IArmbot) this.program.getMachine()).getRotation().x);
|
||||
ForgeDirection direction = MathUtility.getFacingDirectionFromAngle(((IArmbot) this.program.getMachine()).getRotation().x);
|
||||
List<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
if (this.stack != null)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue