merged intsetting and doublesetting, began config to some extent, removed stringsetting because no one used it, reformat

This commit is contained in:
0x150 2021-12-19 15:44:47 +01:00
parent 3a59320916
commit 521829882c
23 changed files with 264 additions and 155 deletions

View file

@ -12,6 +12,18 @@ public class DoubleSetting extends SettingBase<Double> {
this.max = max;
}
public double getMin() {
return min;
}
public double getMax() {
return max;
}
public int getPrecision() {
return precision;
}
@Override public Double parse(String value) {
try {
return Double.parseDouble(value);

View file

@ -1,42 +0,0 @@
package me.x150.sipprivate.config;
public class IntSetting extends SettingBase<Integer> {
final int min;
final int max;
public IntSetting(Integer defaultValue, String name, String description, int min, int max) {
super(defaultValue, name, description);
this.min = min;
this.max = max;
}
@Override public Integer parse(String value) {
try {
return Integer.parseInt(value);
} catch (Exception ignored) {
return defaultValue;
}
}
public static class Builder extends SettingBase.Builder<Builder, Integer, IntSetting> {
int min = Integer.MIN_VALUE, max = Integer.MAX_VALUE;
public Builder(Integer defaultValue) {
super(defaultValue);
}
public Builder min(int min) {
this.min = min;
return this;
}
public Builder max(int max) {
this.max = max;
return this;
}
@Override public IntSetting get() {
return new IntSetting(defaultValue, name, description, min, max);
}
}
}

View file

@ -1,23 +0,0 @@
package me.x150.sipprivate.config;
public class StringSetting extends SettingBase<String> {
public StringSetting(String defaultValue, String name, String description) {
super(defaultValue, name, description);
}
@Override public String parse(String value) {
return value;
}
public static class Builder extends SettingBase.Builder<Builder, String, StringSetting> {
public Builder(String defaultValue) {
super(defaultValue);
}
@Override public StringSetting get() {
return new StringSetting(defaultValue, name, description);
}
}
}

View file

@ -1,5 +1,6 @@
package me.x150.sipprivate.feature.gui.clickgui;
import me.x150.sipprivate.feature.gui.FastTickable;
import me.x150.sipprivate.feature.gui.clickgui.element.Element;
import me.x150.sipprivate.feature.gui.clickgui.element.impl.CategoryDisplay;
import me.x150.sipprivate.feature.module.ModuleType;
@ -11,11 +12,13 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class ClickGUI extends Screen {
List<Element> elements = new ArrayList<>();
ParticleRenderer real = new ParticleRenderer(300);
public class ClickGUI extends Screen implements FastTickable {
List<Element> elements = new ArrayList<>();
ParticleRenderer real = new ParticleRenderer(300);
public ClickGUI() {
public static final ClickGUI instance = new ClickGUI();
private ClickGUI() {
super(Text.of(""));
initElements();
}
@ -79,4 +82,10 @@ public class ClickGUI extends Screen {
@Override public boolean isPauseScreen() {
return false;
}
@Override public void onFastTick() {
for (Element element : elements) {
element.tickAnim();
}
}
}

View file

@ -11,9 +11,10 @@ import java.util.ArrayList;
import java.util.List;
public class ParticleRenderer {
static Color DYING = new Color(255,255,255,0); // it goes gradient so you can still see the white
static Color DYING = new Color(255, 255, 255, 0); // it goes gradient so you can still see the white
List<Particle> particles = new ArrayList<>();
int pc;
public ParticleRenderer(int pc) {
this.pc = pc;
for (int i = 0; i < pc; i++) {
@ -62,7 +63,7 @@ public class ParticleRenderer {
void render(MatrixStack stack) {
stack.push();
stack.translate(x, y, 0);
stack.multiply(new Quaternion(0, 0, (System.currentTimeMillis() % rotSpeed) / ((float) rotSpeed) * 360f * (spinsReverse?-1:1), true));
stack.multiply(new Quaternion(0, 0, (System.currentTimeMillis() % rotSpeed) / ((float) rotSpeed) * 360f * (spinsReverse ? -1 : 1), true));
Renderer.R2D.fill(stack, Renderer.Util.lerp(Theme.ACCENT, DYING, size / 10d), -size, -size, size, size);
stack.pop();
}

View file

@ -3,10 +3,10 @@ package me.x150.sipprivate.feature.gui.clickgui;
import java.awt.Color;
public class Theme {
public static Color ACCENT = new Color(0xFF4C29);
public static Color HEADER = new Color(0x334756);
public static Color MODULE = new Color(0x2C394B);
public static Color CONFIG = new Color(0x082032);
public static Color ACTIVE = new Color(0, 159, 227,255);
public static Color INACTIVE = new Color(78, 94, 103,255);
public static Color ACCENT = new Color(0xFF4C29);
public static Color HEADER = new Color(0x334756);
public static Color MODULE = new Color(0x2C394B);
public static Color CONFIG = new Color(0x082032);
public static Color ACTIVE = new Color(0, 159, 227, 255);
public static Color INACTIVE = new Color(78, 94, 103, 255);
}

View file

@ -3,7 +3,7 @@ package me.x150.sipprivate.feature.gui.clickgui.element;
import net.minecraft.client.util.math.MatrixStack;
public abstract class Element {
public double x, y, width, height;
protected double x, y, width, height;
public Element(double x, double y, double w, double h) {
this.x = x;
@ -26,6 +26,8 @@ public abstract class Element {
abstract public void render(MatrixStack matrices);
abstract public void tickAnim();
public double getWidth() {
return width;
}
@ -33,4 +35,20 @@ public abstract class Element {
public double getHeight() {
return height;
}
public void setY(double y) {
this.y = y;
}
public void setX(double x) {
this.x = x;
}
public void setHeight(double height) {
this.height = height;
}
public void setWidth(double width) {
this.width = width;
}
}

View file

@ -86,11 +86,17 @@ public class CategoryDisplay extends Element {
cfr.drawCenteredString(matrices, mt.getName(), x + width / 2d, y + headerHeight() / 2d - cfr.getFontHeight() / 2d, 0xFFFFFF);
double y = headerHeight();
for (ModuleDisplay moduleDisplay : md) {
moduleDisplay.x = this.x;
moduleDisplay.y = this.y + y;
moduleDisplay.setX(this.x);
moduleDisplay.setY(this.y + y);
moduleDisplay.render(matrices);
y += moduleDisplay.getHeight();
}
this.height = y;
}
@Override public void tickAnim() {
for (ModuleDisplay moduleDisplay : md) {
moduleDisplay.tickAnim();
}
}
}

View file

@ -1,13 +1,14 @@
package me.x150.sipprivate.feature.gui.clickgui.element.impl;
import me.x150.sipprivate.config.BooleanSetting;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.config.ModuleConfig;
import me.x150.sipprivate.config.SettingBase;
import me.x150.sipprivate.feature.gui.clickgui.Theme;
import me.x150.sipprivate.feature.gui.clickgui.element.Element;
import me.x150.sipprivate.feature.gui.clickgui.element.impl.config.BooleanSettingEditor;
import me.x150.sipprivate.feature.gui.clickgui.element.impl.config.ConfigBase;
import me.x150.sipprivate.helper.font.FontRenderers;
import me.x150.sipprivate.feature.gui.clickgui.element.impl.config.DoubleSettingEditor;
import me.x150.sipprivate.helper.render.Renderer;
import net.minecraft.client.util.math.MatrixStack;
@ -16,28 +17,38 @@ import java.util.List;
public class ConfigDisplay extends Element {
List<ConfigBase<?>> bases = new ArrayList<>();
ModuleConfig mc;
ModuleConfig mc;
double padding = 3;
double paddingLeft = 2;
public ConfigDisplay(double x, double y, ModuleConfig mc) {
super(x, y, 100, mc.getSettings().size()* FontRenderers.getNormal().getMarginHeight());
super(x, y, 100, 0);
this.mc = mc;
for (SettingBase<?> setting : mc.getSettings()) {
if (setting instanceof BooleanSetting set) {
BooleanSettingEditor bse = new BooleanSettingEditor(0,0,100,set);
BooleanSettingEditor bse = new BooleanSettingEditor(0, 0, width-padding-paddingLeft, set);
bases.add(bse);
} else if (setting instanceof DoubleSetting set) {
DoubleSettingEditor dse = new DoubleSettingEditor(0,0,width-padding-paddingLeft,set);
bases.add(dse);
}
}
this.height = bases.stream().map(Element::getHeight).reduce(Double::sum).orElse(0d);
}
@Override public boolean clicked(double x, double y, int button) {
for (ConfigBase<?> basis : bases) {
if (basis.clicked(x,y,button)) return true;
if (basis.clicked(x, y, button)) {
return true;
}
}
return false;
}
@Override public boolean dragged(double x, double y, double deltaX, double deltaY) {
for (ConfigBase<?> basis : bases) {
if (basis.dragged(x, y, deltaX, deltaY)) return true;
if (basis.dragged(x, y, deltaX, deltaY)) {
return true;
}
}
return false;
}
@ -51,25 +62,30 @@ public class ConfigDisplay extends Element {
@Override public boolean keyPressed(int keycode) {
for (ConfigBase<?> basis : bases) {
if (basis.keyPressed(keycode)) return true;
if (basis.keyPressed(keycode)) {
return true;
}
}
return false;
}
@Override public void render(MatrixStack matrices) {
double yOffset = 0;
Renderer.R2D.fill(matrices, Theme.ACCENT, x, this.y, x+1, this.y+height);
Renderer.R2D.fill(matrices,Theme.CONFIG,x,this.y,x+width,this.y+height);
// for (SettingBase<?> setting : mc.getSettings()) {
// FontRenderers.getNormal().drawString(matrices,setting.getName(),x,this.y+yOffset,0xFFFFFF);
// yOffset += FontRenderers.getNormal().getMarginHeight();
// }
Renderer.R2D.fill(matrices, Theme.CONFIG, x, this.y, x + width, this.y + height);
Renderer.R2D.fill(matrices, Theme.ACCENT, x, this.y, x + 1, this.y + height);
for (ConfigBase<?> basis : bases) {
basis.x = x+2;
basis.y = this.y+yOffset;
basis.setX(x + padding);
basis.setY(this.y + yOffset);
basis.render(matrices);
yOffset += basis.getHeight();
}
this.height = yOffset;
}
@Override public void tickAnim() {
for (ConfigBase<?> basis : bases) {
basis.tickAnim();
}
}
}

View file

@ -7,15 +7,17 @@ import me.x150.sipprivate.helper.font.FontRenderers;
import me.x150.sipprivate.helper.render.Renderer;
import me.x150.sipprivate.util.Utils;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
public class ModuleDisplay extends Element {
Module module;
Module module;
ConfigDisplay cd;
boolean extended = false;
double extendAnim = 0;
public ModuleDisplay(double x, double y, Module module) {
super(x, y, 100, 15);
this.module = module;
this.cd = new ConfigDisplay(x,y,module.config);
this.cd = new ConfigDisplay(x, y, module.config);
}
@Override public boolean clicked(double x, double y, int button) {
@ -28,8 +30,9 @@ public class ModuleDisplay extends Element {
return false;
}
return true;
} else
} else {
return extended && cd.clicked(x, y, button);
}
}
@Override public boolean dragged(double x, double y, double deltaX, double deltaY) {
@ -39,24 +42,37 @@ public class ModuleDisplay extends Element {
@Override public boolean released() {
return extended && cd.released();
}
double easeInOutCubic(double x) {
return x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2;
}
@Override public double getHeight() {
return super.getHeight()+(extended?cd.getHeight():0);
return super.getHeight() + cd.getHeight()*easeInOutCubic(extendAnim);
}
@Override public boolean keyPressed(int keycode) {
return extended && cd.keyPressed(keycode);
}
boolean extended = false;
@Override public void render(MatrixStack matrices) {
boolean hovered = inBounds(Utils.Mouse.getMouseX(), Utils.Mouse.getMouseY());
Renderer.R2D.fill(matrices, hovered?Theme.MODULE.darker():Theme.MODULE, x, y, x + width, y + height);
Renderer.R2D.fill(matrices, hovered ? Theme.MODULE.darker() : Theme.MODULE, x, y, x + width, y + height);
FontRenderers.getNormal().drawCenteredString(matrices, module.getName(), x + width / 2d, y + height / 2d - FontRenderers.getNormal().getMarginHeight() / 2d, 0xFFFFFF);
if (module.isEnabled()) {
Renderer.R2D.fill(matrices, Theme.ACCENT, x, y, x + 1, y + height);
}
cd.x = this.x;
cd.y = this.y+height;
if (extended) cd.render(matrices);
cd.setX(this.x);
cd.setY(this.y + height);
Renderer.R2D.scissor(x,y,width,getHeight());
cd.render(matrices);
Renderer.R2D.unscissor();
}
@Override public void tickAnim() {
double a = 0.04;
if (!extended) a *= -1;
extendAnim += a;
extendAnim = MathHelper.clamp(extendAnim, 0, 1);
cd.tickAnim();
}
}

View file

@ -5,20 +5,17 @@ import me.x150.sipprivate.feature.gui.clickgui.Theme;
import me.x150.sipprivate.helper.font.FontRenderers;
import me.x150.sipprivate.helper.render.Renderer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
public class BooleanSettingEditor extends ConfigBase<BooleanSetting> {
public BooleanSettingEditor(double x, double y, double width, BooleanSetting configValue) {
super(x, y, width, FontRenderers.getNormal().getFontHeight()+2, configValue);
}
double rw = 14;
double rh = 5;
double rid = 4;
double margin = .5;
double animProgress = 0;
@Override public boolean clicked(double x, double y, int button) {
// System.out.println(x+", "+y+", "+button);
if (inBounds(x, y) && button == 0) {
// System.out.println("clicked");
configValue.setValue(!configValue.getValue());
return true;
}
return false;
public BooleanSettingEditor(double x, double y, double width, BooleanSetting configValue) {
super(x, y, width, FontRenderers.getNormal().getFontHeight() + 2, configValue);
}
@Override public boolean dragged(double x, double y, double deltaX, double deltaY) {
@ -29,16 +26,50 @@ public class BooleanSettingEditor extends ConfigBase<BooleanSetting> {
return false;
}
@Override public boolean clicked(double x, double y, int button) {
// System.out.println(x+", "+y+", "+button);
if (inBounds(x, y) && button == 0) {
// System.out.println("clicked");
configValue.setValue(!configValue.getValue());
return true;
}
return false;
}
double getPreferredX() {
double smoothAnimProgress = easeInOutCubic(animProgress);
return MathHelper.lerp(smoothAnimProgress, x + margin, x + rw - rid - margin);
// return configValue.getValue() ? x + rw - rid - margin : x + margin;
}
// double xSmooth = -1;
@Override public boolean keyPressed(int keycode) {
return false;
}
double rw = 14;
double rh = 7;
double rid = 5;
@Override public void render(MatrixStack matrices) {
Renderer.R2D.fill(matrices,configValue.getValue()? Theme.ACTIVE : Theme.INACTIVE,x,y+height/2d-rh/2d,x+rw,y+height/2d+rh/2d);
double rix = configValue.getValue()?x+rw-rid-1:x+1;
Renderer.R2D.fill(matrices,Theme.ACCENT,rix,y+height/2d-rh/2d+1,rix+rid,y+height/2d-rh/2d+1+rid);
FontRenderers.getNormal().drawString(matrices,configValue.getName(), x+rw+2,y+height/2d-FontRenderers.getNormal().getMarginHeight()/2d,0xFFFFFF);
double smoothAnimProgress = easeInOutCubic(animProgress);
// if (xSmooth==-1) xSmooth = getPreferredX();
Renderer.R2D.fill(matrices, Renderer.Util.lerp(Theme.ACTIVE, Theme.INACTIVE, smoothAnimProgress), x, y + height / 2d - rh / 2d, x + rw, y + height / 2d + rh / 2d);
double rix = getPreferredX();
Renderer.R2D.fill(matrices, Theme.ACCENT, rix, y + height / 2d - rh / 2d + margin, rix + rid, y + height / 2d - rh / 2d + margin + rid);
// Renderer.R2D.renderCircle(matrices, Theme.ACCENT,);
FontRenderers.getNormal().drawString(matrices, configValue.getName(), x + rw + 2, y + height / 2d - FontRenderers.getNormal().getMarginHeight() / 2d, 0xFFFFFF);
}
double easeInOutCubic(double x) {
return x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2;
}
@Override public void tickAnim() {
double a = 0.03;
if (!configValue.getValue()) {
a *= -1;
}
animProgress += a;
animProgress = MathHelper.clamp(animProgress, 0, 1);
}
}

View file

@ -5,6 +5,7 @@ import me.x150.sipprivate.feature.gui.clickgui.element.Element;
public abstract class ConfigBase<C extends SettingBase<?>> extends Element {
C configValue;
public ConfigBase(double x, double y, double width, double height, C configValue) {
super(x, y, width, height);
this.configValue = configValue;

View file

@ -0,0 +1,65 @@
package me.x150.sipprivate.feature.gui.clickgui.element.impl.config;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.feature.gui.clickgui.Theme;
import me.x150.sipprivate.helper.font.FontRenderers;
import me.x150.sipprivate.helper.render.Renderer;
import me.x150.sipprivate.util.Utils;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
public class DoubleSettingEditor extends ConfigBase<DoubleSetting> {
public DoubleSettingEditor(double x, double y, double width, DoubleSetting configValue) {
super(x, y, width, FontRenderers.getNormal().getMarginHeight()+10, configValue);
}
void handleClick(double x) {
double translated = x - this.x;
double perIn = MathHelper.clamp(translated/width,0,1);
configValue.setValue(Utils.Math.roundToDecimal(perIn*(configValue.getMax()- configValue.getMin())+configValue.getMin(), configValue.getPrecision()));
}
boolean clicked = false;
@Override public boolean clicked(double x, double y, int button) {
if (inBounds(x, y)) {
clicked = true;
handleClick(x);
return true;
}
return false;
}
@Override public boolean dragged(double x, double y, double deltaX, double deltaY) {
if (clicked) {
handleClick(x);
}
return false;
}
@Override public boolean released() {
clicked = false;
return false;
}
@Override public boolean keyPressed(int keycode) {
return false;
}
double getPer() {
return MathHelper.clamp((configValue.getValue()-configValue.getMin()) / (configValue.getMax()- configValue.getMin()), 0, 1);
}
@Override public void render(MatrixStack matrices) {
FontRenderers.getNormal().drawString(matrices,configValue.name,x,y,0xFFFFFF);
String t = configValue.getValue().toString();
FontRenderers.getNormal().drawString(matrices,t,x+width-FontRenderers.getNormal().getStringWidth(t)-1,y,0xFFFFFF);
double h = y+FontRenderers.getNormal().getMarginHeight()+1; // 9 px left
Renderer.R2D.fill(matrices,Theme.INACTIVE,x,h+9/2d-.5,x+width,h+9/2d+.5);
Renderer.R2D.fill(matrices, Theme.ACTIVE, x, h+9/2d-.5, x+width*getPer(),h+9/2d+.5);
Renderer.R2D.fill(matrices,Theme.ACCENT,x+width*getPer()-.5,h+.5,x+width*getPer()+.5,h+8.5);
}
@Override public void tickAnim() {
}
}

View file

@ -6,16 +6,16 @@
package me.x150.sipprivate.feature.module;
import me.x150.sipprivate.config.BooleanSetting;
import me.x150.sipprivate.config.IntSetting;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.config.ModuleConfig;
import me.x150.sipprivate.feature.gui.notifications.Notification;
import net.minecraft.client.util.math.MatrixStack;
public abstract class Module {
public final ModuleConfig config;
public final IntSetting keybind;
private final String name;
public final ModuleConfig config;
public final DoubleSetting keybind;
private final String name;
private final String description;
private final ModuleType moduleType;
private final BooleanSetting toasts;
@ -26,7 +26,7 @@ public abstract class Module {
this.description = d;
this.moduleType = type;
this.config = new ModuleConfig();
this.keybind = this.config.create(new IntSetting.Builder(-1).name("Keybind").description("The keybind to toggle the module with").min(-1).get());
this.keybind = this.config.create(new DoubleSetting.Builder(-1).name("Keybind").description("The keybind to toggle the module with").min(-1).precision(0).get());
this.toasts = this.config.create(new BooleanSetting.Builder(true).name("Toasts").description("Whether to show enabled / disabled toasts").get());
}

View file

@ -6,7 +6,7 @@
package me.x150.sipprivate.feature.module.impl.exploit;
import me.x150.sipprivate.SipoverPrivate;
import me.x150.sipprivate.config.IntSetting;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.feature.module.Module;
import me.x150.sipprivate.feature.module.ModuleType;
import me.x150.sipprivate.helper.render.Renderer;
@ -23,8 +23,8 @@ import java.util.Objects;
public class Boaty extends Module {
// final SliderValue amount = this.config.create("Amount per tick", 2000, 1, 10000, 0);
IntSetting amount = this.config.create(new IntSetting.Builder(2000).name("Amount per tick").description("How many packets to send per tick").min(1).max(10000).get());
boolean running = false;
DoubleSetting amount = this.config.create(new DoubleSetting.Builder(2000).name("Amount per tick").description("How many packets to send per tick").min(1).precision(0).max(10000).get());
boolean running = false;
Vec3d start = null;
public Boaty() {

View file

@ -8,7 +8,6 @@ package me.x150.sipprivate.feature.module.impl.exploit;
import me.x150.sipprivate.SipoverPrivate;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.config.EnumSetting;
import me.x150.sipprivate.config.IntSetting;
import me.x150.sipprivate.feature.gui.notifications.Notification;
import me.x150.sipprivate.feature.module.Module;
import me.x150.sipprivate.feature.module.ModuleType;
@ -40,7 +39,7 @@ public class Boom extends Module {
// final SliderValue power = (SliderValue) this.config.create("Power", 20, 0, 127, 0).description("How big the fireball's gonna be");
// final MultiValue mode = (MultiValue) this.config.create("Mode", "fbGhast", "fbGhast", "fbInstant").description("How to do the funny");
DoubleSetting speed = this.config.create(new DoubleSetting.Builder(2).name("Speed").description("How fast the fireball goes").min(1).max(10).precision(1).get());
IntSetting power = this.config.create(new IntSetting.Builder(20).name("Power").description("How big the fireball will be").min(0).max(127).get());
DoubleSetting power = this.config.create(new DoubleSetting.Builder(20).precision(0).name("Power").description("How big the fireball will be").min(0).max(127).get());
EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.FireballGhast).name("Mode").description("How to send the fireball off").get());
long lastFired = 0L;

View file

@ -8,7 +8,7 @@ package me.x150.sipprivate.feature.module.impl.exploit;
import com.mojang.blaze3d.systems.RenderSystem;
import me.x150.sipprivate.SipoverPrivate;
import me.x150.sipprivate.config.BooleanSetting;
import me.x150.sipprivate.config.IntSetting;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.config.SettingsGroup;
import me.x150.sipprivate.feature.gui.notifications.Notification;
import me.x150.sipprivate.feature.module.Module;
@ -76,7 +76,7 @@ public class CaveMapper extends Module {
// final SliderValue cacheSize = (SliderValue) this.config.create("Cache size", 10000, 5000, 30000, 0)
// .description("How big the cache should be (bigger = more time + more memory)");
// final BooleanValue includeTranslucent = (BooleanValue) this.config.create("Scan transparent", true).description("Scans through transparent blocks aswell as air");
IntSetting cacheSize = this.config.create(new IntSetting.Builder(10000).name("Cache size").description("How big the cache should be (bigger = more time + more memory)").min(5000)
DoubleSetting cacheSize = this.config.create(new DoubleSetting.Builder(10000).precision(0).name("Cache size").description("How big the cache should be (bigger = more time + more memory)").min(5000)
.max(30000).get());
BooleanSetting includeTranslucent = this.config.create(new BooleanSetting.Builder(true).name("Scan transparent").description("Scan through transparent blocks as well").get());
SettingsGroup scanner = this.config.create(new SettingsGroup.Builder().name("Scanner").description("The scanner configuration")

View file

@ -7,7 +7,7 @@ package me.x150.sipprivate.feature.module.impl.exploit;
import me.x150.sipprivate.SipoverPrivate;
import me.x150.sipprivate.config.BooleanSetting;
import me.x150.sipprivate.config.IntSetting;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.feature.module.Module;
import me.x150.sipprivate.feature.module.ModuleType;
import me.x150.sipprivate.helper.Rotations;
@ -28,7 +28,7 @@ import net.minecraft.util.math.Vec3d;
public class InstaBow extends Module {
IntSetting it = this.config.create(new IntSetting.Builder(40).name("Iterations").description("How often to spoof velocity (more = bigger damage)").min(5).max(100).get());
DoubleSetting it = this.config.create(new DoubleSetting.Builder(40).precision(0).name("Iterations").description("How often to spoof velocity (more = bigger damage)").min(5).max(100).get());
BooleanSetting autoFire = this.config.create(new BooleanSetting.Builder(false).name("Auto fire").description("Automatically fire the bow when its held and an entity is on the same Y").get());
public InstaBow() {

View file

@ -6,8 +6,8 @@
package me.x150.sipprivate.feature.module.impl.exploit;
import me.x150.sipprivate.SipoverPrivate;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.config.EnumSetting;
import me.x150.sipprivate.config.IntSetting;
import me.x150.sipprivate.feature.module.Module;
import me.x150.sipprivate.feature.module.ModuleType;
import net.minecraft.client.util.math.MatrixStack;
@ -27,7 +27,7 @@ import java.util.Random;
public class NoComCrash extends Module {
final Random r = new Random();
IntSetting packets = this.config.create(new IntSetting.Builder(5).name("Packets per tick").description("How many crash packets to send per tick").min(1).max(100).get());
DoubleSetting packets = this.config.create(new DoubleSetting.Builder(5).precision(0).name("Packets per tick").description("How many crash packets to send per tick").min(1).max(100).get());
EnumSetting<Method> method = this.config.create(new EnumSetting.Builder<>(Method.Interact).name("Method")
.description("Chunk loading method. Interact works on vanilla/spigot, BLT on creative mode").get());
int i = 0;

View file

@ -6,7 +6,7 @@
package me.x150.sipprivate.feature.module.impl.exploit;
import me.x150.sipprivate.SipoverPrivate;
import me.x150.sipprivate.config.IntSetting;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.feature.module.Module;
import me.x150.sipprivate.feature.module.ModuleType;
import net.minecraft.client.util.math.MatrixStack;
@ -16,7 +16,7 @@ import net.minecraft.util.math.Direction;
public class OffhandCrash extends Module {
IntSetting a = this.config.create(new IntSetting.Builder(500).name("Amount").description("How many crash packets to send per tick").min(10).max(10000).get());
DoubleSetting a = this.config.create(new DoubleSetting.Builder(500).precision(0).name("Amount").description("How many crash packets to send per tick").min(10).max(10000).get());
public OffhandCrash() {
super("OffhandCrash", "crashes players with offhand packets", ModuleType.EXPLOIT);

View file

@ -1,7 +1,7 @@
package me.x150.sipprivate.feature.module.impl.exploit;
import me.x150.sipprivate.SipoverPrivate;
import me.x150.sipprivate.config.IntSetting;
import me.x150.sipprivate.config.DoubleSetting;
import me.x150.sipprivate.feature.gui.notifications.Notification;
import me.x150.sipprivate.feature.module.Module;
import me.x150.sipprivate.feature.module.ModuleType;
@ -15,12 +15,12 @@ import java.awt.Color;
import java.util.concurrent.atomic.AtomicBoolean;
public class Voider extends Module {
IntSetting radius = this.config.create(new IntSetting.Builder(100).name("Radius").description("How much to erase on X and Z").min(20).max(500).get());
IntSetting delay = this.config.create(new IntSetting.Builder(30).name("Delay").description("How much delay to use while erasing").min(0).max(1000).get());
DoubleSetting radius = this.config.create(new DoubleSetting.Builder(100).precision(0).name("Radius").description("How much to erase on X and Z").min(20).max(500).get());
DoubleSetting delay = this.config.create(new DoubleSetting.Builder(30).precision(0).name("Delay").description("How much delay to use while erasing").min(0).max(1000).get());
Thread runner;
AtomicBoolean cancel = new AtomicBoolean(false);
Vec3d startPos = null;
Vec3d latest = null;
AtomicBoolean cancel = new AtomicBoolean(false);
Vec3d startPos = null;
Vec3d latest = null;
public Voider() {
super("Voider", "Transforms a radius around you to void", ModuleType.EXPLOIT);
@ -31,8 +31,8 @@ public class Voider extends Module {
}
void run() {
for (int ox = -radius.getValue(); ox < radius.getValue(); ox += 4) {
for (int oz = -radius.getValue(); oz < radius.getValue(); oz += 4) {
for (double ox = -radius.getValue(); ox < radius.getValue(); ox += 4) {
for (double oz = -radius.getValue(); oz < radius.getValue(); oz += 4) {
if (cancel.get()) {
return;
}
@ -41,7 +41,7 @@ public class Voider extends Module {
latest = Vec3d.of(pp);
String chat = String.format("/fill %d %d %d %d %d %d minecraft:air", pp.getX() - 2, SipoverPrivate.client.world.getBottomY(), pp.getZ() - 2, pp.getX() + 2, SipoverPrivate.client.world.getTopY() - 1, pp.getZ() + 2);
SipoverPrivate.client.player.sendChatMessage(chat);
Utils.sleep(delay.getValue());
Utils.sleep((long) (delay.getValue()+0));
}
}
setEnabled(false);

View file

@ -15,7 +15,7 @@ public class ClickGUI extends Module {
@Override public void tick() {
t--;
if (t == 0) {
SipoverPrivate.client.setScreen(new me.x150.sipprivate.feature.gui.clickgui.ClickGUI());
SipoverPrivate.client.setScreen(me.x150.sipprivate.feature.gui.clickgui.ClickGUI.instance);
setEnabled(false);
}
}

View file

@ -275,11 +275,11 @@ public class Renderer {
RenderSystem.disableTexture();
RenderSystem.setShader(GameRenderer::getPositionColorShader);
bufferBuilder.begin(VertexFormat.DrawMode.TRIANGLE_FAN, VertexFormats.POSITION_COLOR);
for(int i = 0;i<360;i+=(360/segments)) {
for (int i = 0; i < 360; i += (360 / segments)) {
double radians = Math.toRadians(i);
double sin = Math.sin(radians)*rad;
double cos = Math.cos(radians)*rad;
bufferBuilder.vertex(matrix,(float) (originX+sin),(float) (originY+cos),0).color(g, h, k, f).next();
double sin = Math.sin(radians) * rad;
double cos = Math.cos(radians) * rad;
bufferBuilder.vertex(matrix, (float) (originX + sin), (float) (originY + cos), 0).color(g, h, k, f).next();
}
bufferBuilder.end();
BufferRenderer.draw(bufferBuilder);