aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/isxander/yacl/impl
diff options
context:
space:
mode:
authorXander <xander@isxander.dev>2023-04-25 16:28:41 +0100
committerGitHub <noreply@github.com>2023-04-25 16:28:41 +0100
commit13c7ba45ff201423eb8dba8a40cfb66ebb531439 (patch)
tree1e799aa9da11fbc0833bc6b7c6e6799633c2ec50 /src/main/java/dev/isxander/yacl/impl
parent8ba7196ae990fe9aa98680aba1b387e385fff99c (diff)
downloadYetAnotherConfigLib-13c7ba45ff201423eb8dba8a40cfb66ebb531439.tar.gz
YetAnotherConfigLib-13c7ba45ff201423eb8dba8a40cfb66ebb531439.tar.bz2
YetAnotherConfigLib-13c7ba45ff201423eb8dba8a40cfb66ebb531439.zip
Architectury! (#61)
Diffstat (limited to 'src/main/java/dev/isxander/yacl/impl')
-rw-r--r--src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java115
-rw-r--r--src/main/java/dev/isxander/yacl/impl/utils/YACLConstants.java8
2 files changed, 0 insertions, 123 deletions
diff --git a/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java b/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java
deleted file mode 100644
index 6c7508d..0000000
--- a/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package dev.isxander.yacl.impl.utils;
-
-import dev.isxander.yacl.api.utils.Dimension;
-import dev.isxander.yacl.api.utils.MutableDimension;
-
-public class DimensionIntegerImpl implements MutableDimension<Integer> {
- private int x, y;
- private int width, height;
-
- public DimensionIntegerImpl(int x, int y, int width, int height) {
- this.x = x;
- this.y = y;
- this.width = width;
- this.height = height;
- }
-
- @Override
- public Integer x() {
- return x;
- }
-
- @Override
- public Integer y() {
- return y;
- }
-
- @Override
- public Integer width() {
- return width;
- }
-
- @Override
- public Integer height() {
- return height;
- }
-
- @Override
- public Integer xLimit() {
- return x + width;
- }
-
- @Override
- public Integer yLimit() {
- return y + height;
- }
-
- @Override
- public Integer centerX() {
- return x + width / 2;
- }
-
- @Override
- public Integer centerY() {
- return y + height / 2;
- }
-
- @Override
- public boolean isPointInside(Integer x, Integer y) {
- return x >= x() && x <= xLimit() && y >= y() && y <= yLimit();
- }
-
- @Override
- public MutableDimension<Integer> clone() {
- return new DimensionIntegerImpl(x, y, width, height);
- }
-
- @Override public MutableDimension<Integer> setX(Integer x) { this.x = x; return this; }
- @Override public MutableDimension<Integer> setY(Integer y) { this.y = y; return this; }
- @Override public MutableDimension<Integer> setWidth(Integer width) { this.width = width; return this; }
- @Override public MutableDimension<Integer> setHeight(Integer height) { this.height = height; return this; }
-
- @Override
- public Dimension<Integer> withX(Integer x) {
- return clone().setX(x);
- }
-
- @Override
- public Dimension<Integer> withY(Integer y) {
- return clone().setY(y);
- }
-
- @Override
- public Dimension<Integer> withWidth(Integer width) {
- return clone().setWidth(width);
- }
-
- @Override
- public Dimension<Integer> withHeight(Integer height) {
- return clone().setHeight(height);
- }
-
- @Override
- public MutableDimension<Integer> move(Integer x, Integer y) {
- this.x += x;
- this.y += y;
- return this;
- }
-
- @Override
- public MutableDimension<Integer> expand(Integer width, Integer height) {
- this.width += width;
- this.height += height;
- return this;
- }
-
- @Override
- public Dimension<Integer> moved(Integer x, Integer y) {
- return clone().move(x, y);
- }
-
- @Override
- public Dimension<Integer> expanded(Integer width, Integer height) {
- return clone().expand(width, height);
- }
-}
diff --git a/src/main/java/dev/isxander/yacl/impl/utils/YACLConstants.java b/src/main/java/dev/isxander/yacl/impl/utils/YACLConstants.java
deleted file mode 100644
index 3d382d4..0000000
--- a/src/main/java/dev/isxander/yacl/impl/utils/YACLConstants.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package dev.isxander.yacl.impl.utils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class YACLConstants {
- public static final Logger LOGGER = LoggerFactory.getLogger("YetAnotherConfigLib");
-}