aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit
diff options
context:
space:
mode:
authorsyeyoung <42869671+cyoung06@users.noreply.github.com>2021-05-04 11:59:09 +0900
committerGitHub <noreply@github.com>2021-05-04 11:59:09 +0900
commit031d1803f0abe485dac3f6d07206cc8501421505 (patch)
tree1dea05d845ba0834ae8d117db9fa4980b1872402 /src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit
parent6e3fae6c448c1443a1658f0803083fe95f6c2a52 (diff)
parent9d4c8a2f567f9cded9838ee57e1fe63d36ac8c8d (diff)
downloadSkyblock-Dungeons-Guide-031d1803f0abe485dac3f6d07206cc8501421505.tar.gz
Skyblock-Dungeons-Guide-031d1803f0abe485dac3f6d07206cc8501421505.tar.bz2
Skyblock-Dungeons-Guide-031d1803f0abe485dac3f6d07206cc8501421505.zip
Merge pull request #3 from My-Name-Is-Jeff/master
Add copyright header and code cleanup
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEdit.java22
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java22
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java20
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java20
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditCreator.java24
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java18
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java18
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditNull.java18
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java18
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java25
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditRegistry.java20
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java18
12 files changed, 230 insertions, 13 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEdit.java
index 5025132d..b5c135c4 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEdit.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEdit.java
@@ -1,9 +1,27 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
public interface ValueEdit<T extends Object> {
- public void setParameter(Parameter parameter);
+ void setParameter(Parameter parameter);
- public void renderWorld(float partialTicks);
+ void renderWorld(float partialTicks);
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java
index fe711ad7..69d0158e 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditAColor.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.config.types.AColor;
@@ -110,7 +128,7 @@ public class ValueEditAColor extends MPanel implements ValueEdit<AColor> {
}
}
- private float[] hsv = new float[3];
+ private final float[] hsv = new float[3];
private float alpha = 0;
public void update() {
@@ -139,7 +157,7 @@ public class ValueEditAColor extends MPanel implements ValueEdit<AColor> {
GlStateManager.enableBlend();
GlStateManager.disableDepth();
GlStateManager.disableTexture2D();
- GlStateManager.disableCull();;
+ GlStateManager.disableCull();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
// worldrenderer.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java
index b485986c..dfd854bf 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditBoolean.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.gui.MPanel;
@@ -28,7 +46,7 @@ public class ValueEditBoolean extends MPanel implements ValueEdit<Boolean> {
}
{
boolean newData = (Boolean) parameter.getNewData();
- final MStringSelectionButton textField = new MStringSelectionButton(Arrays.asList(new String[] {"true", "false"}), Boolean.toString(newData));
+ final MStringSelectionButton textField = new MStringSelectionButton(Arrays.asList("true", "false"), Boolean.toString(newData));
textField.setOnUpdate(new Runnable() {
@Override
public void run() {
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java
index c39c2179..04c07a9c 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditColor.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.gui.MPanel;
@@ -92,7 +110,7 @@ public class ValueEditColor extends MPanel implements ValueEdit<Color> {
}
}
- private float[] hsv = new float[3];
+ private final float[] hsv = new float[3];
public void update() {
if (hsv[2] > 1) hsv[2] = 1;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditCreator.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditCreator.java
index 2991e03e..dda484d9 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditCreator.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditCreator.java
@@ -1,11 +1,29 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
public interface ValueEditCreator<T extends ValueEdit> {
- public T createValueEdit(Parameter parameter);
+ T createValueEdit(Parameter parameter);
- public Object createDefaultValue(Parameter parameter);
+ Object createDefaultValue(Parameter parameter);
- public Object cloneObj(Object object);
+ Object cloneObj(Object object);
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java
index c5d23053..4092cf28 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditFloat.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.gui.MPanel;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java
index 4d61cdd6..8a5f36c9 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditInteger.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.gui.MPanel;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditNull.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditNull.java
index 5caf8af9..4c9e32a7 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditNull.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditNull.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.roomedit.Parameter;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java
index 3d121493..1cd4deba 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPoint.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java
index bf26c3ea..0cdaab0d 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
@@ -24,11 +42,12 @@ public class ValueEditOffsetPointSet extends MPanel implements ValueEdit<OffsetP
// just create
// add set
- private MPanel scroll;
+ private final MPanel scroll;
@Getter
- private List<MPanel> MParameters = new ArrayList<MPanel>();
+ private final List<MPanel> MParameters = new ArrayList<MPanel>();
- private MButton add, addSet;
+ private final MButton add;
+ private final MButton addSet;
public void delete(OffsetPoint offsetPoint) {
((OffsetPointSet)parameter.getNewData()).getOffsetPointList().remove(offsetPoint);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditRegistry.java
index 4437088e..1df64a6c 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditRegistry.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditRegistry.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.config.types.AColor;
@@ -13,7 +31,7 @@ import java.util.List;
import java.util.Map;
public class ValueEditRegistry {
- private static Map<String, ValueEditCreator> valueEditMap = new HashMap<String, ValueEditCreator>();
+ private static final Map<String, ValueEditCreator> valueEditMap = new HashMap<String, ValueEditCreator>();
public static ValueEditCreator getValueEditMap(String className) {
return valueEditMap.get(className);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java
index f978d845..157e7b42 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java
@@ -1,3 +1,21 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
package kr.syeyoung.dungeonsguide.roomedit.valueedit;
import kr.syeyoung.dungeonsguide.gui.MPanel;