Large gears now use shift-click to be constructed
This commit is contained in:
parent
9d959cb779
commit
bb6ea3f92d
1 changed files with 12 additions and 4 deletions
|
@ -118,6 +118,10 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
||||||
if (WrenchUtility.isUsableWrench(player, player.getCurrentEquippedItem(), x(), y(), z()))
|
if (WrenchUtility.isUsableWrench(player, player.getCurrentEquippedItem(), x(), y(), z()))
|
||||||
{
|
{
|
||||||
if (player.isSneaking())
|
if (player.isSneaking())
|
||||||
|
{
|
||||||
|
getMultiBlock().toggleConstruct();
|
||||||
|
}
|
||||||
|
else if (ControlKeyModifer.isControlDown(player))
|
||||||
{
|
{
|
||||||
if (!world().isRemote)
|
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") + ".");
|
player.addChatMessage("Flipped gear to rotate " + (angularVelocity > 0 ? "clockwise" : "anticlockwise") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ControlKeyModifer.isControlDown(player))
|
|
||||||
{
|
|
||||||
getMultiBlock().toggleConstruct();
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getMultiBlock().get().manualCrankTime = 10;
|
getMultiBlock().get().manualCrankTime = 10;
|
||||||
|
@ -139,6 +139,14 @@ public class PartGear extends PartMechanical implements IMechanical, IMultiBlock
|
||||||
WrenchUtility.damageWrench(player, player.getCurrentEquippedItem(), x(), y(), z());
|
WrenchUtility.damageWrench(player, player.getCurrentEquippedItem(), x(), y(), z());
|
||||||
return true;
|
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);
|
return super.activate(player, hit, item);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue