Ver Fonte

Merge remote-tracking branch 'upstream/v2' into object-list-list-entry

# Conflicts:
#	build.gradle
#	gradle.properties
#	src/main/java/me/shedaniel/clothconfig2/impl/ScissorsHandlerImpl.java
Mitchell Skaggs há 5 anos atrás
pai
commit
f2e9cfd172

+ 4 - 0
build.gradle

@@ -7,6 +7,7 @@ plugins {
     id 'signing'
     id 'com.jfrog.bintray' version '1.8.4'
     id 'com.matthewprenger.cursegradle' version '1.4.0'
+    id 'java-library'
 }
 
 repositories {
@@ -50,6 +51,9 @@ dependencies {
     modApi "net.fabricmc:fabric-loader:${project.loader_version}"
     modApi "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
 
+    modApi "me.shedaniel.cloth:basic-math:0.3.0"
+    include "me.shedaniel.cloth:basic-math:0.3.0"
+
     modImplementation "io.github.prospector:modmenu:${modmenu_version}"
 
     modImplementation "com.lettuce.fudge:notenoughcrashes-api:1.0.0"

+ 1 - 1
gradle.properties

@@ -2,6 +2,6 @@ minecraft_version=1.15.1
 yarn_mappings=1.15.1+build.37
 loader_version=0.7.4+build.177
 fabric_version=0.4.28+build.288-1.15
-mod_version=2.8.0
+mod_version=2.8.4
 modmenu_version=1.8.4+build.20
 nec_version=1.2.3+1.15.1

+ 23 - 1
src/main/java/me/shedaniel/clothconfig2/api/ModifierKeyCode.java

@@ -1,6 +1,8 @@
 package me.shedaniel.clothconfig2.api;
 
 import me.shedaniel.clothconfig2.impl.ModifierKeyCodeImpl;
+import me.shedaniel.clothconfig2.mixin.MouseHooks;
+import net.minecraft.client.MinecraftClient;
 import net.minecraft.client.util.InputUtil;
 
 public interface ModifierKeyCode {
@@ -13,10 +15,12 @@ public interface ModifierKeyCode {
     Modifier getModifier();
     
     default boolean matchesMouse(int button) {
-        return getType() == InputUtil.Type.MOUSE && getKeyCode().getKeyCode() == button && getModifier().matchesCurrent();
+        return !isUnknown() && getType() == InputUtil.Type.MOUSE && getKeyCode().getKeyCode() == button && getModifier().matchesCurrent();
     }
     
     default boolean matchesKey(int keyCode, int scanCode) {
+        if (isUnknown())
+            return false;
         if (keyCode == InputUtil.UNKNOWN_KEYCODE.getKeyCode()) {
             return getType() == InputUtil.Type.SCANCODE && getKeyCode().getKeyCode() == scanCode && getModifier().matchesCurrent();
         } else {
@@ -24,6 +28,24 @@ public interface ModifierKeyCode {
         }
     }
     
+    default boolean matchesCurrentMouse() {
+        if (!isUnknown() && getType() == InputUtil.Type.MOUSE && getModifier().matchesCurrent()) {
+            switch (getKeyCode().getKeyCode()) {
+                case 0:
+                    return MinecraftClient.getInstance().mouse.wasLeftButtonClicked();
+                case 1:
+                    return MinecraftClient.getInstance().mouse.wasRightButtonClicked();
+                case 2:
+                    return ((MouseHooks) MinecraftClient.getInstance().mouse).middleButtonClicked();
+            }
+        }
+        return false;
+    }
+    
+    default boolean matchesCurrentKey() {
+        return !isUnknown() && getType() == InputUtil.Type.KEYSYM && getModifier().matchesCurrent() && InputUtil.isKeyPressed(MinecraftClient.getInstance().getWindow().getHandle(), getKeyCode().getKeyCode());
+    }
+    
     ModifierKeyCode setKeyCode(InputUtil.KeyCode keyCode);
     
     ModifierKeyCode setModifier(Modifier modifier);

+ 11 - 0
src/main/java/me/shedaniel/clothconfig2/mixin/MouseHooks.java

@@ -0,0 +1,11 @@
+package me.shedaniel.clothconfig2.mixin;
+
+import net.minecraft.client.Mouse;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.gen.Accessor;
+
+@Mixin(Mouse.class)
+public interface MouseHooks {
+    @Accessor("middleButtonClicked")
+    boolean middleButtonClicked();
+}

+ 7 - 52
src/main/java/me/shedaniel/math/api/Dimension.java

@@ -1,33 +1,20 @@
 package me.shedaniel.math.api;
 
-public class Dimension implements Cloneable {
-    public int width;
-    public int height;
-    
+public class Dimension extends me.shedaniel.math.Dimension {
     public Dimension() {
-        this(0, 0);
+        super();
     }
     
     public Dimension(Dimension d) {
-        this(d.width, d.height);
+        super(d);
     }
     
-    public Dimension(int width, int height) {
-        this.width = width;
-        this.height = height;
+    public Dimension(me.shedaniel.math.Dimension d) {
+        super(d);
     }
     
-    public int getWidth() {
-        return width;
-    }
-    
-    public int getHeight() {
-        return height;
-    }
-    
-    public void setSize(double width, double height) {
-        this.width = (int) Math.ceil(width);
-        this.height = (int) Math.ceil(height);
+    public Dimension(int width, int height) {
+        super(width, height);
     }
     
     public Dimension getSize() {
@@ -37,36 +24,4 @@ public class Dimension implements Cloneable {
     public void setSize(Dimension d) {
         setSize(d.width, d.height);
     }
-    
-    public void setSize(int width, int height) {
-        this.width = width;
-        this.height = height;
-    }
-    
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof Dimension) {
-            Dimension d = (Dimension) obj;
-            return (width == d.width) && (height == d.height);
-        }
-        return false;
-    }
-    
-    @Override
-    public int hashCode() {
-        int result = 1;
-        result = 31 * result + width;
-        result = 31 * result + height;
-        return result;
-    }
-    
-    @Override
-    public String toString() {
-        return getClass().getName() + "[width=" + width + ",height=" + height + "]";
-    }
-    
-    @Override
-    public Dimension clone() {
-        return getSize();
-    }
 }

+ 9 - 55
src/main/java/me/shedaniel/math/api/Point.java

@@ -1,77 +1,31 @@
 package me.shedaniel.math.api;
 
-public class Point implements Cloneable {
-    public int x;
-    public int y;
-    
+public class Point extends me.shedaniel.math.Point {
     public Point() {
-        this(0, 0);
+        super();
     }
     
     public Point(Point p) {
-        this(p.x, p.y);
+        super(p);
     }
     
-    public Point(double x, double y) {
-        this((int) x, (int) y);
-    }
-    
-    public Point(int x, int y) {
-        this.x = x;
-        this.y = y;
+    public Point(me.shedaniel.math.Point p) {
+        super(p);
     }
     
-    public int getX() {
-        return x;
+    public Point(double x, double y) {
+        super(x, y);
     }
     
-    public int getY() {
-        return y;
+    public Point(int x, int y) {
+        super(x, y);
     }
     
     public Point getLocation() {
         return new Point(x, y);
     }
     
-    @Override
     public Point clone() {
         return getLocation();
     }
-    
-    public void setLocation(double x, double y) {
-        this.x = (int) Math.floor(x + 0.5);
-        this.y = (int) Math.floor(y + 0.5);
-    }
-    
-    public void move(int x, int y) {
-        this.x = x;
-        this.y = y;
-    }
-    
-    public void translate(int dx, int dy) {
-        this.x += dx;
-        this.y += dy;
-    }
-    
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof Point) {
-            Point pt = (Point) obj;
-            return (x == pt.x) && (y == pt.y);
-        }
-        return super.equals(obj);
-    }
-    
-    @Override
-    public int hashCode() {
-        int result = 1;
-        result = 31 * result + x;
-        result = 31 * result + y;
-        return result;
-    }
-    
-    @Override
-    public String toString() {
-        return getClass().getName() + "[x=" + x + ",y=" + y + "]";
-    }
 }

+ 28 - 412
src/main/java/me/shedaniel/math/api/Rectangle.java

@@ -1,125 +1,66 @@
 package me.shedaniel.math.api;
 
-import java.util.Objects;
-
-public class Rectangle implements Cloneable {
-    public int x;
-    public int y;
-    public int width;
-    public int height;
-    
+public class Rectangle extends me.shedaniel.math.Rectangle {
     public Rectangle() {
-        this(0, 0, 0, 0);
+        super();
     }
     
     public Rectangle(Rectangle r) {
-        this(r.x, r.y, r.width, r.height);
+        super(r);
     }
     
     public Rectangle(int width, int height) {
-        this(0, 0, width, height);
+        super(width, height);
     }
     
     public Rectangle(Point p, Dimension d) {
-        this(p.x, p.y, d.width, d.height);
+        super(p, d);
     }
     
     public Rectangle(Point p) {
-        this(p.x, p.y, 0, 0);
+        super(p);
     }
     
     public Rectangle(Dimension d) {
-        this(0, 0, d.width, d.height);
-    }
-    
-    public Rectangle(int x, int y, int width, int height) {
-        this.x = x;
-        this.y = y;
-        this.width = width;
-        this.height = height;
-    }
-    
-    public int getX() {
-        return x;
-    }
-    
-    public int getMinX() {
-        return x;
-    }
-    
-    public int getMaxX() {
-        return x + width;
-    }
-    
-    public int getCenterX() {
-        return x + width / 2;
-    }
-    
-    public int getY() {
-        return y;
+        super(d);
     }
     
-    public int getMinY() {
-        return y;
+    public Rectangle(me.shedaniel.math.Rectangle r) {
+        super(r);
     }
     
-    public int getMaxY() {
-        return y + height;
+    public Rectangle(me.shedaniel.math.Point p, me.shedaniel.math.Dimension d) {
+        super(p, d);
     }
     
-    public int getCenterY() {
-        return y + height / 2;
+    public Rectangle(me.shedaniel.math.Point p) {
+        super(p);
     }
     
-    public int getWidth() {
-        return width;
+    public Rectangle(me.shedaniel.math.Dimension d) {
+        super(d);
     }
     
-    public int getHeight() {
-        return height;
+    public Rectangle(int x, int y, int width, int height) {
+        super(x, y, width, height);
     }
     
+    @Override
     public Rectangle getBounds() {
         return new Rectangle(x, y, width, height);
     }
     
     public void setBounds(Rectangle r) {
-        setBounds(r.x, r.y, r.width, r.height);
-    }
-    
-    public void setBounds(int x, int y, int width, int height) {
-        reshape(x, y, width, height);
-    }
-    
-    @Deprecated
-    public void reshape(int x, int y, int width, int height) {
-        this.x = x;
-        this.y = y;
-        this.width = width;
-        this.height = height;
+        setBounds((me.shedaniel.math.Rectangle) r);
     }
     
+    @Override
     public Point getLocation() {
         return new Point(x, y);
     }
     
     public void setLocation(Point p) {
-        setLocation(p.x, p.y);
-    }
-    
-    public void setLocation(int x, int y) {
-        move(x, y);
-    }
-    
-    @Deprecated
-    public void move(int x, int y) {
-        this.x = x;
-        this.y = y;
-    }
-    
-    public void translate(int dx, int dy) {
-        this.x += dx;
-        this.y += dy;
+        setLocation((me.shedaniel.math.Point) p);
     }
     
     @Override
@@ -132,359 +73,34 @@ public class Rectangle implements Cloneable {
     }
     
     public void setSize(Dimension d) {
-        setSize(d.width, d.height);
-    }
-    
-    public void setSize(int width, int height) {
-        resize(width, height);
-    }
-    
-    @Deprecated
-    public void resize(int width, int height) {
-        this.width = width;
-        this.height = height;
+        setSize((me.shedaniel.math.Dimension) d);
     }
     
     public boolean contains(Point p) {
         return contains(p.x, p.y);
     }
     
-    public boolean contains(int x, int y) {
-        return inside(x, y);
-    }
-    
-    public boolean contains(double x, double y) {
-        return inside((int) x, (int) y);
-    }
-    
     public boolean contains(Rectangle r) {
         return contains(r.x, r.y, r.width, r.height);
     }
     
-    public boolean contains(int X, int Y, int W, int H) {
-        int w = this.width;
-        int h = this.height;
-        if ((w | h | W | H) < 0) {
-            // At least one of the dimensions is negative...
-            return false;
-        }
-        // Note: if any dimension is zero, tests below must return false...
-        int x = this.x;
-        int y = this.y;
-        if (X < x || Y < y) {
-            return false;
-        }
-        w += x;
-        W += X;
-        if (W <= X) {
-            // X+W overflowed or W was zero, return false if...
-            // either original w or W was zero or
-            // x+w did not overflow or
-            // the overflowed x+w is smaller than the overflowed X+W
-            if (w >= x || W > w)
-                return false;
-        } else {
-            // X+W did not overflow and W was not zero, return false if...
-            // original w was zero or
-            // x+w did not overflow and x+w is smaller than X+W
-            if (w >= x && W > w)
-                return false;
-        }
-        h += y;
-        H += Y;
-        if (H <= Y) {
-            if (h >= y || H > h)
-                return false;
-        } else {
-            if (h >= y && H > h)
-                return false;
-        }
-        return true;
-    }
-    
-    @Deprecated
-    public boolean inside(int X, int Y) {
-        int w = this.width;
-        int h = this.height;
-        if ((w | h) < 0) {
-            // At least one of the dimensions is negative...
-            return false;
-        }
-        // Note: if either dimension is zero, tests below must return false...
-        int x = this.x;
-        int y = this.y;
-        if (X < x || Y < y) {
-            return false;
-        }
-        w += x;
-        h += y;
-        //    overflow || intersect
-        return ((w < x || w > X) && (h < y || h > Y));
-    }
-    
     public boolean intersects(Rectangle r) {
-        int tw = this.width;
-        int th = this.height;
-        int rw = r.width;
-        int rh = r.height;
-        if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) {
-            return false;
-        }
-        int tx = this.x;
-        int ty = this.y;
-        int rx = r.x;
-        int ry = r.y;
-        rw += rx;
-        rh += ry;
-        tw += tx;
-        th += ty;
-        //      overflow || intersect
-        return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry));
+        return intersects((me.shedaniel.math.Rectangle) r);
     }
     
     public Rectangle intersection(Rectangle r) {
-        int tx1 = this.x;
-        int ty1 = this.y;
-        int rx1 = r.x;
-        int ry1 = r.y;
-        long tx2 = tx1;
-        tx2 += this.width;
-        long ty2 = ty1;
-        ty2 += this.height;
-        long rx2 = rx1;
-        rx2 += r.width;
-        long ry2 = ry1;
-        ry2 += r.height;
-        if (tx1 < rx1)
-            tx1 = rx1;
-        if (ty1 < ry1)
-            ty1 = ry1;
-        if (tx2 > rx2)
-            tx2 = rx2;
-        if (ty2 > ry2)
-            ty2 = ry2;
-        tx2 -= tx1;
-        ty2 -= ty1;
-        // tx2,ty2 will never overflow (they will never be
-        // larger than the smallest of the two source w,h)
-        // they might underflow, though...
-        if (tx2 < Integer.MIN_VALUE)
-            tx2 = Integer.MIN_VALUE;
-        if (ty2 < Integer.MIN_VALUE)
-            ty2 = Integer.MIN_VALUE;
-        return new Rectangle(tx1, ty1, (int) tx2, (int) ty2);
+        return new Rectangle(intersection((me.shedaniel.math.Rectangle) r));
     }
     
     public Rectangle union(Rectangle r) {
-        long tx2 = this.width;
-        long ty2 = this.height;
-        if ((tx2 | ty2) < 0) {
-            // This rectangle has negative dimensions...
-            // If r has non-negative dimensions then it is the answer.
-            // If r is non-existant (has a negative dimension), then both
-            // are non-existant and we can return any non-existant rectangle
-            // as an answer.  Thus, returning r meets that criterion.
-            // Either way, r is our answer.
-            return new Rectangle(r);
-        }
-        long rx2 = r.width;
-        long ry2 = r.height;
-        if ((rx2 | ry2) < 0) {
-            return new Rectangle(this);
-        }
-        int tx1 = this.x;
-        int ty1 = this.y;
-        tx2 += tx1;
-        ty2 += ty1;
-        int rx1 = r.x;
-        int ry1 = r.y;
-        rx2 += rx1;
-        ry2 += ry1;
-        if (tx1 > rx1)
-            tx1 = rx1;
-        if (ty1 > ry1)
-            ty1 = ry1;
-        if (tx2 < rx2)
-            tx2 = rx2;
-        if (ty2 < ry2)
-            ty2 = ry2;
-        tx2 -= tx1;
-        ty2 -= ty1;
-        // tx2,ty2 will never underflow since both original rectangles
-        // were already proven to be non-empty
-        // they might overflow, though...
-        if (tx2 > Integer.MAX_VALUE)
-            tx2 = Integer.MAX_VALUE;
-        if (ty2 > Integer.MAX_VALUE)
-            ty2 = Integer.MAX_VALUE;
-        return new Rectangle(tx1, ty1, (int) tx2, (int) ty2);
-    }
-    
-    public void add(int newx, int newy) {
-        if ((width | height) < 0) {
-            this.x = newx;
-            this.y = newy;
-            this.width = this.height = 0;
-            return;
-        }
-        int x1 = this.x;
-        int y1 = this.y;
-        long x2 = this.width;
-        long y2 = this.height;
-        x2 += x1;
-        y2 += y1;
-        if (x1 > newx)
-            x1 = newx;
-        if (y1 > newy)
-            y1 = newy;
-        if (x2 < newx)
-            x2 = newx;
-        if (y2 < newy)
-            y2 = newy;
-        x2 -= x1;
-        y2 -= y1;
-        if (x2 > Integer.MAX_VALUE)
-            x2 = Integer.MAX_VALUE;
-        if (y2 > Integer.MAX_VALUE)
-            y2 = Integer.MAX_VALUE;
-        reshape(x1, y1, (int) x2, (int) y2);
+        return new Rectangle(union((me.shedaniel.math.Rectangle) r));
     }
     
-    public void add(Point pt) {
-        add(pt.x, pt.y);
+    public void add(Point r) {
+        add((me.shedaniel.math.Point) r);
     }
     
     public void add(Rectangle r) {
-        long tx2 = this.width;
-        long ty2 = this.height;
-        if ((tx2 | ty2) < 0) {
-            reshape(r.x, r.y, r.width, r.height);
-        }
-        long rx2 = r.width;
-        long ry2 = r.height;
-        if ((rx2 | ry2) < 0) {
-            return;
-        }
-        int tx1 = this.x;
-        int ty1 = this.y;
-        tx2 += tx1;
-        ty2 += ty1;
-        int rx1 = r.x;
-        int ry1 = r.y;
-        rx2 += rx1;
-        ry2 += ry1;
-        if (tx1 > rx1)
-            tx1 = rx1;
-        if (ty1 > ry1)
-            ty1 = ry1;
-        if (tx2 < rx2)
-            tx2 = rx2;
-        if (ty2 < ry2)
-            ty2 = ry2;
-        tx2 -= tx1;
-        ty2 -= ty1;
-        // tx2,ty2 will never underflow since both original
-        // rectangles were non-empty
-        // they might overflow, though...
-        if (tx2 > Integer.MAX_VALUE)
-            tx2 = Integer.MAX_VALUE;
-        if (ty2 > Integer.MAX_VALUE)
-            ty2 = Integer.MAX_VALUE;
-        reshape(tx1, ty1, (int) tx2, (int) ty2);
-    }
-    
-    public void grow(int h, int v) {
-        long x0 = this.x;
-        long y0 = this.y;
-        long x1 = this.width;
-        long y1 = this.height;
-        x1 += x0;
-        y1 += y0;
-        
-        x0 -= h;
-        y0 -= v;
-        x1 += h;
-        y1 += v;
-        
-        if (x1 < x0) {
-            // Non-existant in X direction
-            // Final width must remain negative so subtract x0 before
-            // it is clipped so that we avoid the risk that the clipping
-            // of x0 will reverse the ordering of x0 and x1.
-            x1 -= x0;
-            if (x1 < Integer.MIN_VALUE)
-                x1 = Integer.MIN_VALUE;
-            if (x0 < Integer.MIN_VALUE)
-                x0 = Integer.MIN_VALUE;
-            else if (x0 > Integer.MAX_VALUE)
-                x0 = Integer.MAX_VALUE;
-        } else { // (x1 >= x0)
-            // Clip x0 before we subtract it from x1 in case the clipping
-            // affects the representable area of the rectangle.
-            if (x0 < Integer.MIN_VALUE)
-                x0 = Integer.MIN_VALUE;
-            else if (x0 > Integer.MAX_VALUE)
-                x0 = Integer.MAX_VALUE;
-            x1 -= x0;
-            // The only way x1 can be negative now is if we clipped
-            // x0 against MIN and x1 is less than MIN - in which case
-            // we want to leave the width negative since the result
-            // did not intersect the representable area.
-            if (x1 < Integer.MIN_VALUE)
-                x1 = Integer.MIN_VALUE;
-            else if (x1 > Integer.MAX_VALUE)
-                x1 = Integer.MAX_VALUE;
-        }
-        
-        if (y1 < y0) {
-            // Non-existant in Y direction
-            y1 -= y0;
-            if (y1 < Integer.MIN_VALUE)
-                y1 = Integer.MIN_VALUE;
-            if (y0 < Integer.MIN_VALUE)
-                y0 = Integer.MIN_VALUE;
-            else if (y0 > Integer.MAX_VALUE)
-                y0 = Integer.MAX_VALUE;
-        } else { // (y1 >= y0)
-            if (y0 < Integer.MIN_VALUE)
-                y0 = Integer.MIN_VALUE;
-            else if (y0 > Integer.MAX_VALUE)
-                y0 = Integer.MAX_VALUE;
-            y1 -= y0;
-            if (y1 < Integer.MIN_VALUE)
-                y1 = Integer.MIN_VALUE;
-            else if (y1 > Integer.MAX_VALUE)
-                y1 = Integer.MAX_VALUE;
-        }
-        
-        reshape((int) x0, (int) y0, (int) x1, (int) y1);
-    }
-    
-    public boolean isEmpty() {
-        return (width <= 0) || (height <= 0);
-    }
-    
-    @Override
-    public boolean equals(Object obj) {
-        if (obj instanceof Rectangle) {
-            Rectangle r = (Rectangle) obj;
-            return ((x == r.x) && (y == r.y) && (width == r.width) && (height == r.height));
-        }
-        return super.equals(obj);
-    }
-    
-    @Override
-    public String toString() {
-        return getClass().getName() + "[x=" + x + ",y=" + y + ",width=" + width + ",height=" + height + "]";
-    }
-    
-    @Override
-    public int hashCode() {
-        int result = 1;
-        result = 31 * result + x;
-        result = 31 * result + y;
-        result = 31 * result + width;
-        result = 31 * result + height;
-        return result;
+        add((me.shedaniel.math.Rectangle) r);
     }
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/bg_bg.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "Ignore Restart",
   "text.cloth-config.boolean.value.true": "§aYes",
   "text.cloth-config.boolean.value.false": "§cNo",
-  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions"
+  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth Mod Config Config",
+  "category.cloth-config.scrolling": "Scrolling",
+  "category.cloth-config.testing": "Config Demo",
+  "option.cloth-config.scrollDuration": "Scroll Duration",
+  "option.cloth-config.scrollStep": "Scroll Step",
+  "option.cloth-config.bounceBackMultiplier": "Bounce Multiplier",
+  "option.cloth-config.setDefaultSmoothScroll": "Set Default Smooth Scroll",
+  "option.cloth-config.disableSmoothScroll": "Disable Smooth Scroll"
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/de_de.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "Neustart ignorieren",
   "text.cloth-config.boolean.value.true": "§aJa",
   "text.cloth-config.boolean.value.false": "§cNein",
-  "text.cloth-config.dropdown.value.unknown": "§cKeine Vorschläge"
+  "text.cloth-config.dropdown.value.unknown": "§cKeine Vorschläge",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth Mod Config Config",
+  "category.cloth-config.scrolling": "Scrolling",
+  "category.cloth-config.testing": "Config Demo",
+  "option.cloth-config.scrollDuration": "Scroll Duration",
+  "option.cloth-config.scrollStep": "Scroll Step",
+  "option.cloth-config.bounceBackMultiplier": "Bounce Multiplier",
+  "option.cloth-config.setDefaultSmoothScroll": "Set Default Smooth Scroll",
+  "option.cloth-config.disableSmoothScroll": "Disable Smooth Scroll"
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/en_ud.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "Ignore Restart",
   "text.cloth-config.boolean.value.true": "§aYes",
   "text.cloth-config.boolean.value.false": "§cNo",
-  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions"
+  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth Mod Config Config",
+  "category.cloth-config.scrolling": "Scrolling",
+  "category.cloth-config.testing": "Config Demo",
+  "option.cloth-config.scrollDuration": "Scroll Duration",
+  "option.cloth-config.scrollStep": "Scroll Step",
+  "option.cloth-config.bounceBackMultiplier": "Bounce Multiplier",
+  "option.cloth-config.setDefaultSmoothScroll": "Set Default Smooth Scroll",
+  "option.cloth-config.disableSmoothScroll": "Disable Smooth Scroll"
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/et_ee.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "Ignoreeri taaskäivitust",
   "text.cloth-config.boolean.value.true": "§aJah",
   "text.cloth-config.boolean.value.false": "§cEi",
-  "text.cloth-config.dropdown.value.unknown": "§cSoovitusi pole"
+  "text.cloth-config.dropdown.value.unknown": "§cSoovitusi pole",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth modi seadistuse seadistus",
+  "category.cloth-config.scrolling": "Kerimine",
+  "category.cloth-config.testing": "Seadistuse demo",
+  "option.cloth-config.scrollDuration": "Kerimise kestus",
+  "option.cloth-config.scrollStep": "Kerimise samm",
+  "option.cloth-config.bounceBackMultiplier": "Hüppetegur",
+  "option.cloth-config.setDefaultSmoothScroll": "Määra sujuv kerimine vaikeseadeks",
+  "option.cloth-config.disableSmoothScroll": "Keela sujuv kerimine"
 }

+ 9 - 1
src/main/resources/assets/cloth-config2/lang/fr_fr.json

@@ -27,5 +27,13 @@
   "text.cloth-config.dropdown.value.unknown": "§cAucune suggestion",
   "modifier.cloth-config.alt": "Alt + %s",
   "modifier.cloth-config.ctrl": "Ctrl + %s",
-  "modifier.cloth-config.shift": "Maj. + %s"
+  "modifier.cloth-config.shift": "Maj. + %s",
+  "title.cloth-config.config": "Configuration de Cloth Mod Config",
+  "category.cloth-config.scrolling": "Défilement",
+  "category.cloth-config.testing": "Démo de configuration",
+  "option.cloth-config.scrollDuration": "Durée du défilement",
+  "option.cloth-config.scrollStep": "Pas du défilement",
+  "option.cloth-config.bounceBackMultiplier": "Multiplicateur du rebond",
+  "option.cloth-config.setDefaultSmoothScroll": "Définir le défilement régulier par défaut",
+  "option.cloth-config.disableSmoothScroll": "Désactiver le défilement régulier"
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/ja_jp.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "Ignore Restart",
   "text.cloth-config.boolean.value.true": "§aYes",
   "text.cloth-config.boolean.value.false": "§cNo",
-  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions"
+  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth Mod Config Config",
+  "category.cloth-config.scrolling": "Scrolling",
+  "category.cloth-config.testing": "Config Demo",
+  "option.cloth-config.scrollDuration": "Scroll Duration",
+  "option.cloth-config.scrollStep": "Scroll Step",
+  "option.cloth-config.bounceBackMultiplier": "Bounce Multiplier",
+  "option.cloth-config.setDefaultSmoothScroll": "Set Default Smooth Scroll",
+  "option.cloth-config.disableSmoothScroll": "Disable Smooth Scroll"
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/lol_us.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "Ignore Restart",
   "text.cloth-config.boolean.value.true": "§aYes",
   "text.cloth-config.boolean.value.false": "§cNo",
-  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions"
+  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth Mod Config Config",
+  "category.cloth-config.scrolling": "Scrolling",
+  "category.cloth-config.testing": "Config Demo",
+  "option.cloth-config.scrollDuration": "Scroll Duration",
+  "option.cloth-config.scrollStep": "Scroll Step",
+  "option.cloth-config.bounceBackMultiplier": "Bounce Multiplier",
+  "option.cloth-config.setDefaultSmoothScroll": "Set Default Smooth Scroll",
+  "option.cloth-config.disableSmoothScroll": "Disable Smooth Scroll"
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/pt_br.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "Ignore Restart",
   "text.cloth-config.boolean.value.true": "§aYes",
   "text.cloth-config.boolean.value.false": "§cNo",
-  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions"
+  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth Mod Config Config",
+  "category.cloth-config.scrolling": "Scrolling",
+  "category.cloth-config.testing": "Config Demo",
+  "option.cloth-config.scrollDuration": "Scroll Duration",
+  "option.cloth-config.scrollStep": "Scroll Step",
+  "option.cloth-config.bounceBackMultiplier": "Bounce Multiplier",
+  "option.cloth-config.setDefaultSmoothScroll": "Set Default Smooth Scroll",
+  "option.cloth-config.disableSmoothScroll": "Disable Smooth Scroll"
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/ru_ru.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "Ignore Restart",
   "text.cloth-config.boolean.value.true": "§aYes",
   "text.cloth-config.boolean.value.false": "§cNo",
-  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions"
+  "text.cloth-config.dropdown.value.unknown": "§cNo suggestions",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth Mod Config Config",
+  "category.cloth-config.scrolling": "Scrolling",
+  "category.cloth-config.testing": "Config Demo",
+  "option.cloth-config.scrollDuration": "Scroll Duration",
+  "option.cloth-config.scrollStep": "Scroll Step",
+  "option.cloth-config.bounceBackMultiplier": "Bounce Multiplier",
+  "option.cloth-config.setDefaultSmoothScroll": "Set Default Smooth Scroll",
+  "option.cloth-config.disableSmoothScroll": "Disable Smooth Scroll"
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/zh_cn.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "忽略重启",
   "text.cloth-config.boolean.value.true": "§a是",
   "text.cloth-config.boolean.value.false": "§c否",
-  "text.cloth-config.dropdown.value.unknown": "§c没有建议项"
+  "text.cloth-config.dropdown.value.unknown": "§c没有建议项",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth Mod Config Config",
+  "category.cloth-config.scrolling": "Scrolling",
+  "category.cloth-config.testing": "Config Demo",
+  "option.cloth-config.scrollDuration": "Scroll Duration",
+  "option.cloth-config.scrollStep": "Scroll Step",
+  "option.cloth-config.bounceBackMultiplier": "Bounce Multiplier",
+  "option.cloth-config.setDefaultSmoothScroll": "Set Default Smooth Scroll",
+  "option.cloth-config.disableSmoothScroll": "Disable Smooth Scroll"
 }

+ 12 - 1
src/main/resources/assets/cloth-config2/lang/zh_tw.json

@@ -24,5 +24,16 @@
   "text.cloth-config.ignore_restart": "忽略重啟",
   "text.cloth-config.boolean.value.true": "§a是",
   "text.cloth-config.boolean.value.false": "§c否",
-  "text.cloth-config.dropdown.value.unknown": "§c沒有建議項"
+  "text.cloth-config.dropdown.value.unknown": "§c沒有建議項",
+  "modifier.cloth-config.alt": "Alt + %s",
+  "modifier.cloth-config.ctrl": "Ctrl + %s",
+  "modifier.cloth-config.shift": "Shift + %s",
+  "title.cloth-config.config": "Cloth Mod Config Config",
+  "category.cloth-config.scrolling": "Scrolling",
+  "category.cloth-config.testing": "Config Demo",
+  "option.cloth-config.scrollDuration": "Scroll Duration",
+  "option.cloth-config.scrollStep": "Scroll Step",
+  "option.cloth-config.bounceBackMultiplier": "Bounce Multiplier",
+  "option.cloth-config.setDefaultSmoothScroll": "Set Default Smooth Scroll",
+  "option.cloth-config.disableSmoothScroll": "Disable Smooth Scroll"
 }

+ 2 - 1
src/main/resources/mixin.cloth-config2.json

@@ -7,7 +7,8 @@
   "client": [
     "MixinControlsOptionsScreen",
     "MixinGameOptions",
-    "MixinKeyBinding"
+    "MixinKeyBinding",
+    "MouseHooks"
   ],
   "injectors": {
     "defaultRequire": 1