modules list and remove broken stuff
This commit is contained in:
parent
2a89f212e5
commit
b58eedfb9c
16 changed files with 168 additions and 44 deletions
|
@ -1,8 +1,5 @@
|
|||
package me.kawaiizenbo.moonlight.module.settings;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import me.kawaiizenbo.moonlight.util.ReflectionUtils;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
|
@ -10,11 +7,10 @@ public class BooleanSetting extends Setting
|
|||
{
|
||||
public boolean value;
|
||||
|
||||
public BooleanSetting(String name, boolean value, Method onValueChanged)
|
||||
public BooleanSetting(String name, boolean value)
|
||||
{
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.onValueChanged = onValueChanged;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,7 +29,6 @@ public class BooleanSetting extends Setting
|
|||
if (hovered((int)mouseX, (int)mouseY) && button == 0)
|
||||
{
|
||||
this.value = !value;
|
||||
ReflectionUtils.tryCallMethod(onValueChanged, new Object[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package me.kawaiizenbo.moonlight.module.settings;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import me.kawaiizenbo.moonlight.util.ColorUtils;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.text.Text;
|
||||
|
@ -14,12 +12,11 @@ public class ColorSetting extends Setting
|
|||
public int b;
|
||||
|
||||
|
||||
public ColorSetting(String name, int value, Method onValueChanged)
|
||||
public ColorSetting(String name, int value)
|
||||
{
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.height = 64;
|
||||
this.onValueChanged = onValueChanged;
|
||||
this.r = (value >> 16) & 0xFF;
|
||||
this.g = (value >> 8) & 0xFF;
|
||||
this.b = value & 0xFF;
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package me.kawaiizenbo.moonlight.module.settings;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import me.kawaiizenbo.moonlight.util.MathUtils;
|
||||
import me.kawaiizenbo.moonlight.util.ReflectionUtils;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
|
@ -15,11 +12,10 @@ public class DoubleSetting extends Setting
|
|||
|
||||
boolean sliding = false;
|
||||
|
||||
public DoubleSetting(String name, double value, double min, double max, int roundingPlace, Method onValueChanged)
|
||||
public DoubleSetting(String name, double value, double min, double max, int roundingPlace)
|
||||
{
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.onValueChanged = onValueChanged;
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
this.roundingPlace = roundingPlace;
|
||||
|
@ -66,7 +62,6 @@ public class DoubleSetting extends Setting
|
|||
public void mouseReleased(double mouseX, double mouseY, int button)
|
||||
{
|
||||
sliding = false;
|
||||
ReflectionUtils.tryCallMethod(onValueChanged, new Object[0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue