Remove "Risky Cheats"
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
22b8bc19e1
commit
c14ef7bef1
|
@ -1,17 +0,0 @@
|
|||
package fr.username404.snowygui.mixins;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import fr.username404.snowygui.gui.feature.NoHurtCamera;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
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(GameRenderer.class)
|
||||
abstract class RendererMixin {
|
||||
@Inject(method = "bobHurt", at = @At("HEAD"), cancellable = true)
|
||||
private void onHurt(PoseStack poseStack, float f, CallbackInfo ci) {
|
||||
if (NoHurtCamera.INSTANCE.getToggled()) ci.cancel();
|
||||
}
|
||||
}
|
|
@ -10,11 +10,9 @@ import fr.username404.snowygui.gui.feature.Category
|
|||
import fr.username404.snowygui.gui.feature.Colors
|
||||
import fr.username404.snowygui.gui.feature.Macro
|
||||
import fr.username404.snowygui.gui.feature.Keystrokes
|
||||
import fr.username404.snowygui.gui.feature.riskyCheats
|
||||
import fr.username404.snowygui.gui.feature.Zoom
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import net.minecraft.network.chat.Component
|
||||
import net.minecraft.network.chat.TextComponent
|
||||
import net.minecraft.network.chat.TranslatableComponent
|
||||
import java.util.Optional
|
||||
|
||||
|
@ -70,16 +68,7 @@ val SnowyConfigScreen: Screen = object: Screen(translationComponent) {
|
|||
)
|
||||
)
|
||||
}.build())
|
||||
.addEntry(
|
||||
startBooleanToggle(Component.nullToEmpty("Risky Cheats"), riskyCheats)
|
||||
.setDefaultValue(false)
|
||||
.requireRestart()
|
||||
.setSaveConsumer {
|
||||
riskyCheats = it
|
||||
}.setTooltip(TextComponent("WARNING: Do not use this on servers or you might get banned.").apply {
|
||||
style = style.withColor(Colors.RED.asTextColor())
|
||||
}).build()
|
||||
).addEntry(startSubCategory(TranslatableComponent("$confPrefix.colors")).also { builder ->
|
||||
.addEntry(startSubCategory(TranslatableComponent("$confPrefix.colors")).also { builder ->
|
||||
builder.addAll(
|
||||
ClickGui.clickBoxes.map { box ->
|
||||
startColorField(box.name, box.color).setSaveConsumer {
|
||||
|
|
|
@ -24,7 +24,6 @@ annotation class ButtonInfo(
|
|||
enum class Category(val translationKey: String, val categoryColor: Int, val shouldHide: Boolean = false) {
|
||||
MISC("snowy.clickbox.misc", Colors.BLUE),
|
||||
HUD("snowy.clickbox.hud", Colors.DARK_PURPLE),
|
||||
RISKY("snowy.clickbox.risky", Colors.RED, !riskyCheats),
|
||||
MACROS("snowy.clickbox.macros", Colors.GREEN);
|
||||
companion object {
|
||||
fun fromBox(box: ClickBox): Category? = values().find {
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
package fr.username404.snowygui.gui.feature
|
||||
|
||||
import fr.username404.snowygui.config.Configuration
|
||||
import net.minecraft.client.Minecraft
|
||||
|
||||
internal var riskyCheats: Boolean by Configuration
|
||||
|
||||
@ButtonInfo(Category.RISKY)
|
||||
object NoHurtCamera: ButtonImpl()
|
||||
|
||||
@ButtonInfo(Category.RISKY)
|
||||
object NoGravity: ButtonImpl() {
|
||||
override fun execAction() {
|
||||
Minecraft.getInstance().player?.isNoGravity = this.toggled
|
||||
}
|
||||
}
|
|
@ -19,6 +19,5 @@
|
|||
"key.snowy.configkey": "Open the snowy configuration screen",
|
||||
"snowy.clickbox.misc": "Miscellaneous",
|
||||
"snowy.clickbox.hud": "HUD",
|
||||
"snowy.clickbox.risky": "Risky",
|
||||
"snowy.clickbox.macros": "Macros"
|
||||
}
|
|
@ -19,6 +19,5 @@
|
|||
"key.snowy.configkey": "Ouvrir l'écran de configuration de snowy",
|
||||
"snowy.clickbox.misc": "Divers",
|
||||
"snowy.clickbox.hud": "ATH",
|
||||
"snowy.clickbox.risky": "Risqué",
|
||||
"snowy.clickbox.macros": "Macros"
|
||||
}
|
|
@ -6,8 +6,7 @@
|
|||
"KeysAccessor",
|
||||
"KeyMappings",
|
||||
"EndTickMixin",
|
||||
"TitleScreenMixin",
|
||||
"RendererMixin"
|
||||
"TitleScreenMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
Loading…
Reference in New Issue