Large gears now use shift-click to be constructed

This commit is contained in:
Calclavia 2014-02-06 11:39:54 +08:00
parent 9d959cb779
commit bb6ea3f92d

View file

@ -118,6 +118,10 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
if (WrenchUtility.isUsableWrench(player, player.getCurrentEquippedItem(), x(), y(), z()))
{
if (player.isSneaking())
{
getMultiBlock().toggleConstruct();
}
else if (ControlKeyModifer.isControlDown(player))
{
if (!world().isRemote)
{
@ -125,10 +129,6 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
player.addChatMessage("Flipped gear to rotate " + (angularVelocity > 0 ? "clockwise" : "anticlockwise") + ".");
}
}
else if (ControlKeyModifer.isControlDown(player))
{
getMultiBlock().toggleConstruct();
}
else
{
getMultiBlock().get().manualCrankTime = 10;
@ -139,6 +139,14 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
WrenchUtility.damageWrench(player, player.getCurrentEquippedItem(), x(), y(), z());
return true;
}
else if (player.isSneaking())
{
if (!world().isRemote)
{
getMultiBlock().get().angularVelocity = -angularVelocity;
player.addChatMessage("Flipped gear to rotate " + (angularVelocity > 0 ? "clockwise" : "anticlockwise") + ".");
}
}
return super.activate(player, hit, item);
}