Browse Source

deprecate old Point, Rectangle and Dimension.

Signed-off-by: shedaniel <daniel@shedaniel.me>
shedaniel 5 years ago
parent
commit
bed19c3ae3

+ 1 - 1
gradle.properties

@@ -2,6 +2,6 @@ minecraft_version=20w10a
 yarn_mappings=20w10a+build.2
 yarn_mappings=20w10a+build.2
 loader_version=0.7.8+build.186
 loader_version=0.7.8+build.186
 fabric_version=0.4.34+build.303-1.16
 fabric_version=0.4.34+build.303-1.16
-mod_version=3.0.2-unstable
+mod_version=3.1.0-unstable
 modmenu_version=1.10.1+build.30
 modmenu_version=1.10.1+build.30
 nec_version=1.2.3+1.15.1
 nec_version=1.2.3+1.15.1

+ 1 - 5
src/main/java/me/shedaniel/clothconfig2/api/ScissorsHandler.java

@@ -1,7 +1,7 @@
 package me.shedaniel.clothconfig2.api;
 package me.shedaniel.clothconfig2.api;
 
 
 import me.shedaniel.clothconfig2.impl.ScissorsHandlerImpl;
 import me.shedaniel.clothconfig2.impl.ScissorsHandlerImpl;
-import me.shedaniel.math.api.Rectangle;
+import me.shedaniel.math.Rectangle;
 import net.fabricmc.api.EnvType;
 import net.fabricmc.api.EnvType;
 import net.fabricmc.api.Environment;
 import net.fabricmc.api.Environment;
 
 
@@ -17,10 +17,6 @@ public interface ScissorsHandler {
     
     
     void scissor(Rectangle rectangle);
     void scissor(Rectangle rectangle);
     
     
-    default void scissor(me.shedaniel.math.Rectangle rectangle) {
-        scissor(new Rectangle(rectangle));
-    }
-    
     void removeLastScissor();
     void removeLastScissor();
     
     
     void applyScissors();
     void applyScissors();

+ 1 - 1
src/main/java/me/shedaniel/clothconfig2/impl/ScissorsHandlerImpl.java

@@ -3,8 +3,8 @@ package me.shedaniel.clothconfig2.impl;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Lists;
 import me.shedaniel.clothconfig2.ClothConfigInitializer;
 import me.shedaniel.clothconfig2.ClothConfigInitializer;
 import me.shedaniel.clothconfig2.api.ScissorsHandler;
 import me.shedaniel.clothconfig2.api.ScissorsHandler;
+import me.shedaniel.math.Rectangle;
 import me.shedaniel.math.api.Executor;
 import me.shedaniel.math.api.Executor;
-import me.shedaniel.math.api.Rectangle;
 import net.fabricmc.api.EnvType;
 import net.fabricmc.api.EnvType;
 import net.fabricmc.api.Environment;
 import net.fabricmc.api.Environment;
 import net.fabricmc.loader.api.FabricLoader;
 import net.fabricmc.loader.api.FabricLoader;

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

@@ -1,5 +1,12 @@
 package me.shedaniel.math.api;
 package me.shedaniel.math.api;
 
 
+import org.jetbrains.annotations.ApiStatus;
+
+/**
+ * @deprecated Use {@link me.shedaniel.math.Dimension}
+ */
+@Deprecated
+@ApiStatus.ScheduledForRemoval
 public class Dimension extends me.shedaniel.math.Dimension {
 public class Dimension extends me.shedaniel.math.Dimension {
     public Dimension() {
     public Dimension() {
         super();
         super();

+ 7 - 0
src/main/java/me/shedaniel/math/api/Point.java

@@ -1,5 +1,12 @@
 package me.shedaniel.math.api;
 package me.shedaniel.math.api;
 
 
+import org.jetbrains.annotations.ApiStatus;
+
+/**
+ * @deprecated Use {@link me.shedaniel.math.Point}
+ */
+@Deprecated
+@ApiStatus.ScheduledForRemoval
 public class Point extends me.shedaniel.math.Point {
 public class Point extends me.shedaniel.math.Point {
     public Point() {
     public Point() {
         super();
         super();

+ 7 - 0
src/main/java/me/shedaniel/math/api/Rectangle.java

@@ -1,5 +1,12 @@
 package me.shedaniel.math.api;
 package me.shedaniel.math.api;
 
 
+import org.jetbrains.annotations.ApiStatus;
+
+/**
+ * @deprecated Use {@link me.shedaniel.math.Rectangle}
+ */
+@Deprecated
+@ApiStatus.ScheduledForRemoval
 public class Rectangle extends me.shedaniel.math.Rectangle {
 public class Rectangle extends me.shedaniel.math.Rectangle {
     public Rectangle() {
     public Rectangle() {
         super();
         super();

+ 1 - 1
src/main/java/me/shedaniel/math/impl/PointHelper.java

@@ -1,6 +1,6 @@
 package me.shedaniel.math.impl;
 package me.shedaniel.math.impl;
 
 
-import me.shedaniel.math.api.Point;
+import me.shedaniel.math.Point;
 import net.fabricmc.api.EnvType;
 import net.fabricmc.api.EnvType;
 import net.fabricmc.api.Environment;
 import net.fabricmc.api.Environment;
 import net.minecraft.client.MinecraftClient;
 import net.minecraft.client.MinecraftClient;