Skip to content

Commit c0a5bc9

Browse files
committed
防止在潜行自动搭建时意外触发构造器GUI打开
1 parent 6a9c086 commit c0a5bc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/github/kasuminova/novaeng/common/item/ItemMachineAssemblyTool.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import kotlin.math.min
4444
object ItemMachineAssemblyTool : ItemBasic("machine_assembly_tool"), IConfigurableItem {
4545

4646
override fun onItemRightClick(world: World, player: EntityPlayer, hand: EnumHand): ActionResult<ItemStack> {
47-
if (hand != EnumHand.MAIN_HAND) return super.onItemRightClick(world, player, hand)
47+
if (hand != EnumHand.MAIN_HAND || player.isSneaking) return super.onItemRightClick(world, player, hand)
4848
if (world.isRemote) {
4949
player.openGui(
5050
NovaEngineeringCore.instance,

0 commit comments

Comments
 (0)