Skip to content

Commit

Permalink
Added pause in creative mode option for middle click open (#4717)
Browse files Browse the repository at this point in the history
slmpc authored Jul 3, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent f82d7dc commit f33e87b
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -76,6 +76,14 @@ public class BetterTooltips extends Module {
.build()
);

private final Setting<Boolean> pauseInCreative = sgGeneral.add(new BoolSetting.Builder()
.name("pause-in-creative")
.description("Pauses middle click open while the player is in creative mode.")
.defaultValue(true)
.visible(middleClickOpen::get)
.build()
);

// Previews

private final Setting<Boolean> shulkers = sgPreviews.add(new BoolSetting.Builder()
@@ -438,7 +446,8 @@ private ItemStack createBannerFromShield(ItemStack shieldItem) {
}

public boolean middleClickOpen() {
return isActive() && middleClickOpen.get();
return (isActive() && middleClickOpen.get())
&& (!pauseInCreative.get() || !mc.player.isInCreativeMode());
}

public boolean previewShulkers() {

0 comments on commit f33e87b

Please sign in to comment.