use of dev.hypnotic.ui.BindingScreen in project Hypnotic-Client by Hypnotic-Development.
the class ClientPlayerEntityMixin method tick.
@Inject(method = "tick", at = @At("HEAD"), cancellable = true)
public void tick(CallbackInfo ci) {
for (Mod mod : ModuleManager.INSTANCE.modules) {
if (mc.player != null) {
if (mod.isBinding() && mc.currentScreen == null) {
try {
mc.setScreen(new BindingScreen(mod, null));
} catch (Exception e) {
}
}
if (mod.isEnabled())
mod.onTick();
mod.onTickDisabled();
}
}
for (HudModule mod : HudManager.INSTANCE.hudModules) {
if (mc.player != null) {
if (mod.isEnabled())
mod.onTick();
mod.onTickDisabled();
}
}
RenderUtils.INSTANCE.onTick();
if (mc.world != null)
BaritoneAPI.getSettings().chatControl.value = false;
OptionsScreen options = OptionsScreen.INSTANCE;
BaritoneAPI.getSettings().allowBreak.value = options.allowBreak.isEnabled();
BaritoneAPI.getSettings().allowParkour.value = options.allowParkour.isEnabled();
BaritoneAPI.getSettings().allowParkourAscend.value = options.allowParkour.isEnabled();
BaritoneAPI.getSettings().allowParkourPlace.value = options.allowParkour.isEnabled();
BaritoneAPI.getSettings().allowDownward.value = options.allowParkour.isEnabled();
BaritoneAPI.getSettings().allowDiagonalAscend.value = options.allowParkour.isEnabled();
BaritoneAPI.getSettings().allowDiagonalDescend.value = options.allowParkour.isEnabled();
BaritoneAPI.getSettings().chatControl.value = options.chatControl.isEnabled();
BaritoneAPI.getSettings().allowPlace.value = options.allowPlace.isEnabled();
BaritoneAPI.getSettings().allowInventory.value = options.allowInventory.isEnabled();
BaritoneAPI.getSettings().assumeWalkOnWater.value = options.assumeJesus.isEnabled();
BaritoneAPI.getSettings().assumeWalkOnLava.value = options.assumeJesus.isEnabled();
BaritoneAPI.getSettings().assumeStep.value = options.assumeStep.isEnabled();
BaritoneAPI.getSettings().assumeSafeWalk.value = options.assumeSafewalk.isEnabled();
}
use of dev.hypnotic.ui.BindingScreen in project Hypnotic-Client by Hypnotic-Development.
the class Button method mouseClicked.
public void mouseClicked(double mouseX, double mouseY, int button) {
if (hovered(mouseX, mouseY)) {
if (button == 0) {
mod.toggle();
} else if (button == 1) {
this.extended = !this.extended;
parent.updateButtons();
} else if (button == 2) {
if (!(mod instanceof Waypoint)) {
mod.setBinding(true);
MinecraftClient.getInstance().setScreen(new BindingScreen(mod, ClickGUI.INSTANCE));
} else {
MinecraftClient.getInstance().setScreen(new WaypointScreen((Waypoint) mod));
}
}
}
for (Component component : components) {
component.mouseClicked(mouseX, mouseY, button);
}
}
Aggregations