feat: hide recipe book (#124)
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
package moe.nea.firmament.mixins;
|
||||||
|
|
||||||
|
import moe.nea.firmament.features.fixes.Fixes;
|
||||||
|
import net.minecraft.client.gui.screen.ingame.RecipeBookScreen;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(value = RecipeBookScreen.class, priority = 999)
|
||||||
|
public class MixinRecipeBookScreen {
|
||||||
|
@Inject(method = "addRecipeBook", at = @At("HEAD"), cancellable = true)
|
||||||
|
public void addRecipeBook(CallbackInfo ci) {
|
||||||
|
if (Fixes.TConfig.INSTANCE.getHideRecipeBook()) ci.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -25,6 +25,7 @@ object Fixes : FirmamentFeature {
|
|||||||
val hidePotionEffects by toggle("hide-mob-effects") { false }
|
val hidePotionEffects by toggle("hide-mob-effects") { false }
|
||||||
val noHurtCam by toggle("disable-hurt-cam") { false }
|
val noHurtCam by toggle("disable-hurt-cam") { false }
|
||||||
val hideSlotHighlights by toggle("hide-slot-highlights") { false }
|
val hideSlotHighlights by toggle("hide-slot-highlights") { false }
|
||||||
|
val hideRecipeBook by toggle("hide-recipe-book") { false }
|
||||||
}
|
}
|
||||||
|
|
||||||
override val config: ManagedConfig
|
override val config: ManagedConfig
|
||||||
|
|||||||
@@ -129,6 +129,8 @@
|
|||||||
"firmament.config.fixes.disable-hurt-cam.description": "Disable the damage screen shake animation.",
|
"firmament.config.fixes.disable-hurt-cam.description": "Disable the damage screen shake animation.",
|
||||||
"firmament.config.fixes.hide-mob-effects": "Hide Potion Effects",
|
"firmament.config.fixes.hide-mob-effects": "Hide Potion Effects",
|
||||||
"firmament.config.fixes.hide-mob-effects.description": "Hide Potion effects on the right side of your player inventory.",
|
"firmament.config.fixes.hide-mob-effects.description": "Hide Potion effects on the right side of your player inventory.",
|
||||||
|
"firmament.config.fixes.hide-recipe-book": "No Recipe Book",
|
||||||
|
"firmament.config.fixes.hide-recipe-book.description": "Remove the recipe book from your inventory",
|
||||||
"firmament.config.fixes.hide-slot-highlights": "Hide Slot Highlights",
|
"firmament.config.fixes.hide-slot-highlights": "Hide Slot Highlights",
|
||||||
"firmament.config.fixes.hide-slot-highlights.description": "Hide slot highlights for items with disabled tooltip. This makes /sbmenu look nicer with smooth texture packs.",
|
"firmament.config.fixes.hide-slot-highlights.description": "Hide slot highlights for items with disabled tooltip. This makes /sbmenu look nicer with smooth texture packs.",
|
||||||
"firmament.config.fixes.peek-chat": "Peek Chat",
|
"firmament.config.fixes.peek-chat": "Peek Chat",
|
||||||
|
|||||||
Reference in New Issue
Block a user