Replaced Coordinates with JOML Vector3i
This commit is contained in:
parent
36283b152e
commit
c981b4bd09
13
.idea/libraries/Maven__commons_io_commons_io_2_6.xml
generated
Normal file
13
.idea/libraries/Maven__commons_io_commons_io_2_6.xml
generated
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: commons-io:commons-io:2.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.6/commons-io-2.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.6/commons-io-2.6-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.6/commons-io-2.6-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/Maven__info_picocli_picocli_3_7_0.xml
generated
Normal file
13
.idea/libraries/Maven__info_picocli_picocli_3_7_0.xml
generated
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: info.picocli:picocli:3.7.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/info/picocli/picocli/3.7.0/picocli-3.7.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/info/picocli/picocli/3.7.0/picocli-3.7.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/info/picocli/picocli/3.7.0/picocli-3.7.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/Maven__org_joml_joml_jdk8_1_9_11.xml
generated
Normal file
13
.idea/libraries/Maven__org_joml_joml_jdk8_1_9_11.xml
generated
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.joml:joml-jdk8:1.9.11">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/joml/joml-jdk8/1.9.11/joml-jdk8-1.9.11.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/joml/joml-jdk8/1.9.11/joml-jdk8-1.9.11-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/joml/joml-jdk8/1.9.11/joml-jdk8-1.9.11-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
241
.idea/workspace.xml
generated
241
.idea/workspace.xml
generated
@ -2,12 +2,16 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="6303f571-4608-4678-b04c-0c6cb20f921f" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/libraries/Maven__org_apache_logging_log4j_log4j_jcl_2_11_1.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_apache_logging_log4j_log4j_core_2_11_1.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__commons_io_commons_io_2_6.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__info_picocli_picocli_3_7_0.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_joml_joml_jdk8_1_9_11.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/MinecraftLandGenerator.iml" beforeDir="false" afterPath="$PROJECT_DIR$/MinecraftLandGenerator.iml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Main.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java" afterDir="false" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/bin/" />
|
||||
<ignored path="$PROJECT_DIR$/target/" />
|
||||
@ -36,26 +40,26 @@
|
||||
<usages-collector id="statistics.file.extensions.open">
|
||||
<counts>
|
||||
<entry key="0-SNAPSHOT" value="3" />
|
||||
<entry key="java" value="79" />
|
||||
<entry key="java" value="81" />
|
||||
<entry key="xml" value="2" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.types.open">
|
||||
<counts>
|
||||
<entry key="JAVA" value="79" />
|
||||
<entry key="JAVA" value="81" />
|
||||
<entry key="UML" value="3" />
|
||||
<entry key="XML" value="2" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.edit">
|
||||
<counts>
|
||||
<entry key="java" value="1519" />
|
||||
<entry key="java" value="1961" />
|
||||
<entry key="xml" value="19" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.types.edit">
|
||||
<counts>
|
||||
<entry key="JAVA" value="1519" />
|
||||
<entry key="JAVA" value="1961" />
|
||||
<entry key="XML" value="19" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
@ -64,37 +68,10 @@
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="286">
|
||||
<caret line="19" selection-start-line="19" selection-end-line="19" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileWrite.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="258">
|
||||
<caret line="140" column="22" selection-start-line="140" selection-start-column="22" selection-end-line="140" selection-end-column="22" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Setup.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="500">
|
||||
<caret line="148" column="28" selection-start-line="148" selection-start-column="28" selection-end-line="148" selection-end-column="28" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="171">
|
||||
<caret line="35" column="41" selection-start-line="35" selection-start-column="30" selection-end-line="35" selection-end-column="41" />
|
||||
<state relative-caret-position="-77">
|
||||
<caret line="220" column="13" lean-forward="true" selection-start-line="220" selection-start-column="13" selection-end-line="220" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
@ -102,11 +79,50 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="286">
|
||||
<caret line="38" selection-start-line="38" selection-end-line="38" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Setup.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2750">
|
||||
<caret line="148" column="28" selection-start-line="148" selection-start-column="28" selection-end-line="148" selection-end-column="28" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="6534">
|
||||
<caret line="301" column="1" selection-start-line="301" selection-start-column="1" selection-end-line="301" selection-end-column="1" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="181">
|
||||
<caret line="59" column="63" selection-start-line="59" selection-start-column="63" selection-end-line="59" selection-end-column="63" />
|
||||
<state relative-caret-position="534">
|
||||
<caret line="146" column="60" selection-start-line="146" selection-start-column="60" selection-end-line="146" selection-end-column="60" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="204">
|
||||
<caret line="86" column="49" selection-start-line="86" selection-start-column="49" selection-end-line="86" selection-end-column="49" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -114,8 +130,8 @@
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="220">
|
||||
<caret line="48" column="60" selection-start-line="48" selection-start-column="60" selection-end-line="48" selection-end-column="60" />
|
||||
<state relative-caret-position="314">
|
||||
<caret line="240" column="124" selection-start-line="240" selection-start-column="124" selection-end-line="240" selection-end-column="124" />
|
||||
<folding>
|
||||
<element signature="e#0#6897#0" expanded="true" />
|
||||
</folding>
|
||||
@ -138,7 +154,7 @@
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Update.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="500">
|
||||
<state relative-caret-position="10538">
|
||||
<caret line="513" column="28" selection-start-line="513" selection-start-column="28" selection-end-line="513" selection-end-column="28" />
|
||||
</state>
|
||||
</provider>
|
||||
@ -147,7 +163,7 @@
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Time.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="60">
|
||||
<state relative-caret-position="2002">
|
||||
<caret line="108" column="20" selection-start-line="108" selection-start-column="20" selection-end-line="108" selection-end-column="20" />
|
||||
</state>
|
||||
</provider>
|
||||
@ -208,11 +224,9 @@
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Out.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Test.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Time.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Readme_and_HelpInfo.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Arraylist.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/DownloadFile.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Main.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/GUI/Start.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileWrite.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Input_CLI.java" />
|
||||
@ -221,10 +235,12 @@
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Startup.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Update.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/GUI/MLG_GUI.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java" />
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Main.java" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@ -288,6 +304,7 @@
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
@ -329,11 +346,21 @@
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="GUI" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="MinecraftLandGenerator" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="MinecraftLandGenerator" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="test" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="MinecraftLandGenerator" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="MinecraftLandGenerator" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="zip" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
@ -462,29 +489,30 @@
|
||||
</history-entry>
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="29252000" />
|
||||
<option name="totallyTimeSpent" value="31742000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="28" width="1920" height="1052" extended-state="6" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.17948718" />
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.18162394" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info id="Designer" order="2" />
|
||||
<window_info id="UI Designer" order="3" />
|
||||
<window_info id="Favorites" order="4" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" weight="0.30601093" />
|
||||
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32896176" />
|
||||
<window_info anchor="bottom" id="Find" order="1" weight="0.30555555" />
|
||||
<window_info anchor="bottom" id="Run" order="2" weight="0.32896176" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Version Control" order="7" sideWeight="0.49893162" weight="0.15846995" />
|
||||
<window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
|
||||
<window_info anchor="bottom" id="Terminal" order="9" sideWeight="0.49946582" weight="0.32896176" />
|
||||
<window_info anchor="bottom" id="Terminal" order="9" sideWeight="0.49946582" weight="0.3288889" />
|
||||
<window_info anchor="bottom" id="Event Log" order="10" sideWeight="0.50106835" side_tool="true" weight="0.32861805" />
|
||||
<window_info anchor="bottom" id="Problems" order="11" />
|
||||
<window_info anchor="bottom" id="Messages" order="12" sideWeight="0.49839744" weight="0.32896176" />
|
||||
<window_info active="true" anchor="bottom" id="Messages" order="12" sideWeight="0.49839744" visible="true" weight="0.3288889" />
|
||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||
@ -667,26 +695,6 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="10384">
|
||||
<caret line="505" column="47" selection-start-line="505" selection-start-column="41" selection-end-line="505" selection-end-column="47" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="242">
|
||||
<caret line="36" column="59" selection-start-line="36" selection-start-column="59" selection-end-line="36" selection-end-column="59" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/var.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="242">
|
||||
@ -696,45 +704,18 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileWrite.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="258">
|
||||
<state relative-caret-position="1380">
|
||||
<caret line="140" column="22" selection-start-line="140" selection-start-column="22" selection-end-line="140" selection-end-column="22" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Setup.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="500">
|
||||
<state relative-caret-position="2750">
|
||||
<caret line="148" column="28" selection-start-line="148" selection-start-column="28" selection-end-line="148" selection-end-column="28" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="171">
|
||||
<caret line="35" column="41" selection-start-line="35" selection-start-column="30" selection-end-line="35" selection-end-column="41" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="181">
|
||||
<caret line="59" column="63" selection-start-line="59" selection-start-column="63" selection-end-line="59" selection-end-column="63" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="220">
|
||||
<caret line="48" column="60" selection-start-line="48" selection-start-column="60" selection-end-line="48" selection-end-column="60" />
|
||||
<folding>
|
||||
<element signature="e#0#6897#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Readme_and_HelpInfo.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="440">
|
||||
@ -747,14 +728,14 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Update.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="500">
|
||||
<state relative-caret-position="10538">
|
||||
<caret line="513" column="28" selection-start-line="513" selection-start-column="28" selection-end-line="513" selection-end-column="28" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Time.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="60">
|
||||
<state relative-caret-position="2002">
|
||||
<caret line="108" column="20" selection-start-line="108" selection-start-column="20" selection-end-line="108" selection-end-column="20" />
|
||||
</state>
|
||||
</provider>
|
||||
@ -762,7 +743,51 @@
|
||||
<entry file="file://$PROJECT_DIR$/pom.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="286">
|
||||
<caret line="19" selection-start-line="19" selection-end-line="19" />
|
||||
<caret line="38" selection-start-line="38" selection-end-line="38" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="6534">
|
||||
<caret line="301" column="1" selection-start-line="301" selection-start-column="1" selection-end-line="301" selection-end-column="1" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="314">
|
||||
<caret line="240" column="124" selection-start-line="240" selection-start-column="124" selection-end-line="240" selection-end-column="124" />
|
||||
<folding>
|
||||
<element signature="e#0#6897#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="534">
|
||||
<caret line="146" column="60" selection-start-line="146" selection-start-column="60" selection-end-line="146" selection-end-column="60" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="204">
|
||||
<caret line="86" column="49" selection-start-line="86" selection-start-column="49" selection-end-line="86" selection-end-column="49" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-77">
|
||||
<caret line="220" column="13" lean-forward="true" selection-start-line="220" selection-start-column="13" selection-end-line="220" selection-end-column="13" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -67,5 +67,4 @@ EC40B0ECC52B37571EE65F780994CEDE=1360299846000# MLG v1.7.3
|
||||
750641846428072595BB3D7657AC8EB1=1373344097000# MLG v1.7.4
|
||||
2ADFF46BCF1E77A559E6D9DB9C7586E8=1381398906000# MLG v1.7.5
|
||||
3223FFFEE274215C50C88372D79B9E5C=1421666774000# MLG v1.7.6
|
||||
6BAC4CB261A1F7494D7B9802B7462121=1540554341000# MLG v1.7.7 (Class File, Not .Jar)
|
||||
0706D1A8BCC148805EDAB29B7549B5A7=1541865384000# MLG v1.7.7 (Class File, Not .Jar)
|
||||
72E64BD3C21E559B909A995F38E92C24=1542019123000# MLG v1.7.7 (Class File, Not .Jar)
|
||||
|
@ -30,8 +30,11 @@
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.joml:joml-jdk8:1.9.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: info.picocli:picocli:3.7.0" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -7,9 +7,7 @@
|
||||
|
||||
package morlok8k.MinecraftLandGenerator;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.*;
|
||||
import org.joml.Vector3i;
|
||||
|
||||
/**
|
||||
* Coordinates are in the form of [X,Y,Z] or (X,Z)<br>
|
||||
@ -20,26 +18,26 @@ import java.util.regex.*;
|
||||
* The origin point: When both X and Z are both zero. (elevation is irrelevant)<br>
|
||||
*/
|
||||
public class Coordinates {
|
||||
//FYI: int's (Integer's) are good enough for Minecraft. They have a range of -2,147,483,648 to 2,147,483,647
|
||||
// Minecraft starts failing around (+/-) 12,550,820 and ends at either (+/-) 30,000,000 or (+/-) 32,000,000 (depending on the version).
|
||||
// See: http://www.minecraftwiki.net/wiki/Far_Lands for more info.
|
||||
/*
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* Parses a Coordinates object from a String. Leading and trailing garbage is ignored (FIXME).
|
||||
*
|
||||
* @param StringOfCoords
|
||||
* A short- or long-form coordinate string as described at the two toString() methods
|
||||
* @param StringOfCoords A short- or long-form coordinate string as described at the two toString() methods
|
||||
* @return
|
||||
* @author Morlok8k
|
||||
*/
|
||||
*//*
|
||||
|
||||
public static Coordinates parseString(String StringOfCoords) {
|
||||
|
||||
*/
|
||||
/* public static Vector3i parseString(String StringOfCoords) {
|
||||
//parse out string
|
||||
StringOfCoords = StringOfCoords.trim();
|
||||
|
||||
int x = 0, y = 0, z = 0;
|
||||
|
||||
int start = 0, end = 0, firstComma = 0, secComma = 0;
|
||||
int start, end;
|
||||
String sX = "", sY = "", sZ = "";
|
||||
boolean shortMode = false, notCoords = false;
|
||||
|
||||
@ -58,116 +56,74 @@ public class Coordinates {
|
||||
}
|
||||
|
||||
if (notCoords) {
|
||||
return new Coordinates(0, 0, 0);
|
||||
return new Vector3i(0, 0, 0);
|
||||
}
|
||||
|
||||
String[] coords = StringOfCoords.substring(start, end).split(",");
|
||||
if (shortMode) {
|
||||
|
||||
StringOfCoords = StringOfCoords.substring(start, end);
|
||||
|
||||
firstComma = StringOfCoords.indexOf(",");
|
||||
|
||||
sX = StringOfCoords.substring(start + 1, firstComma);
|
||||
sY = "64";
|
||||
sZ = StringOfCoords.substring(firstComma + 1, end);
|
||||
return new Vector3i(Integer.valueOf(coords[0]), 64, Integer.valueOf(coords[2]));
|
||||
// sX = StringOfCoords.substring(start + 1, firstComma);
|
||||
// sY = "64";
|
||||
// sZ = StringOfCoords.substring(firstComma + 1, end);
|
||||
|
||||
} else {
|
||||
return new Vector3i(Integer.valueOf(coords[0]), Integer.valueOf(coords[1]), Integer.valueOf(coords[2]));
|
||||
// StringOfCoords = StringOfCoords.substring(start, end);
|
||||
|
||||
StringOfCoords = StringOfCoords.substring(start, end);
|
||||
// firstComma = StringOfCoords.indexOf(",");
|
||||
// secComma = StringOfCoords.lastIndexOf(",");
|
||||
|
||||
firstComma = StringOfCoords.indexOf(",");
|
||||
secComma = StringOfCoords.lastIndexOf(",");
|
||||
|
||||
sX = StringOfCoords.substring(start + 1, firstComma);
|
||||
sY = StringOfCoords.substring(firstComma + 1, secComma);
|
||||
sZ = StringOfCoords.substring(secComma + 1, end);
|
||||
// sX = StringOfCoords.substring(start + 1, firstComma);
|
||||
// sY = StringOfCoords.substring(firstComma + 1, secComma);
|
||||
// sZ = StringOfCoords.substring(secComma + 1, end);
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
x = Integer.parseInt(sX);
|
||||
y = Integer.parseInt(sY);
|
||||
z = Integer.parseInt(sZ);
|
||||
} catch (final NumberFormatException e) {
|
||||
return new Coordinates(0, 0, 0);
|
||||
}
|
||||
//try {
|
||||
// x = Integer.parseInt(sX);
|
||||
// y = Integer.parseInt(sY);
|
||||
// z = Integer.parseInt(sZ);
|
||||
//} catch (final NumberFormatException e) {
|
||||
// return new Coordinates(0, 0, 0);
|
||||
//}
|
||||
|
||||
return new Coordinates(x, y, z);
|
||||
//return new Coordinates(x, y, z);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a Coordinates object from a String. Leading and trailing garbage is ignored.
|
||||
*
|
||||
* @param stringOfCoords
|
||||
* A short- or long-form coordinate string as described at the two toString() methods
|
||||
* @return
|
||||
* @author jaseg
|
||||
*/
|
||||
public static Coordinates parseStringRegEx(String stringOfCoords) {
|
||||
int X = 0, Y = 0, Z = 0;
|
||||
boolean matched = false;
|
||||
|
||||
int start = stringOfCoords.indexOf("["), end = stringOfCoords.indexOf("]");
|
||||
|
||||
if ((start == -1) || (end == -1)) {
|
||||
start = stringOfCoords.indexOf("(");
|
||||
end = stringOfCoords.indexOf(")");
|
||||
}
|
||||
|
||||
if ((start != -1) && (end != -1)) {
|
||||
stringOfCoords = stringOfCoords.substring(start, end + 1); // Leading and trailing garbage is ignored
|
||||
}
|
||||
|
||||
final Matcher shortForm =
|
||||
Pattern.compile("\\((-?\\d+),(-?\\d+)\\)").matcher(stringOfCoords);
|
||||
final Matcher normalForm =
|
||||
Pattern.compile("\\[(-?\\d+),(-?\\d+),(-?\\d+)\\]").matcher(stringOfCoords);
|
||||
|
||||
if (shortForm.matches()) {
|
||||
X = Integer.parseInt(shortForm.group(1));
|
||||
Y = 64;
|
||||
Z = Integer.parseInt(shortForm.group(2));
|
||||
matched = true;
|
||||
}
|
||||
|
||||
if (normalForm.matches()) {
|
||||
X = Integer.parseInt(normalForm.group(1));
|
||||
Y = Integer.parseInt(normalForm.group(2));
|
||||
Z = Integer.parseInt(normalForm.group(3));
|
||||
matched = true;
|
||||
}
|
||||
|
||||
if (!matched) {
|
||||
System.err.println("Invalid coordinate format: " + stringOfCoords);
|
||||
}
|
||||
return new Coordinates(X, Y, Z);
|
||||
}
|
||||
*//*
|
||||
|
||||
*/
|
||||
/* public int X = 0;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int X = 0;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
*
|
||||
*//*
|
||||
|
||||
public int Y = 0;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*//*
|
||||
|
||||
public int Z = 0;
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* Someone created a new blank Coordinate! Lets set it to be [0,0,0].
|
||||
*/
|
||||
*//*
|
||||
|
||||
public Coordinates() {
|
||||
clear();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
*/
|
||||
*//*
|
||||
|
||||
public Coordinates(final int x, final int y, final int z) {
|
||||
super();
|
||||
X = x;
|
||||
@ -175,19 +131,23 @@ public class Coordinates {
|
||||
Z = z;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*//*
|
||||
|
||||
public void clear() {
|
||||
X = 0;
|
||||
Y = 0;
|
||||
Z = 0;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "null" })
|
||||
*//*
|
||||
|
||||
@SuppressWarnings({"unused", "null"})
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
// I am overriding the inherited equals method.
|
||||
@ -196,68 +156,91 @@ public class Coordinates {
|
||||
// (by default it gets the memory addresses of each object.)
|
||||
|
||||
// An object must equal itself
|
||||
if (this == obj) { return true; }
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// No object equals null
|
||||
if (obj == null) { return false; }
|
||||
if (this == null) { return false; }
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (this == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Objects of different types are never equal
|
||||
if (getClass() != obj.getClass()) { return false; }
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Cast to an Coordinates, then compare the data
|
||||
final Coordinates c = (Coordinates) obj;
|
||||
if (X != c.X) { return false; }
|
||||
if (Y != c.Y) { return false; }
|
||||
if (Z != c.Z) { return false; }
|
||||
return true; // If none of the above returned something, they must be equal!
|
||||
if (X != c.X) {
|
||||
return false;
|
||||
}
|
||||
if (Y != c.Y) {
|
||||
return false;
|
||||
}
|
||||
if (Z != c.Z) {
|
||||
return false;
|
||||
}
|
||||
return true; // If none of the above returned something, they must be equal!
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* @return the x
|
||||
*/
|
||||
*//*
|
||||
|
||||
public int getX() {
|
||||
return X;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* @return the y
|
||||
*/
|
||||
*//*
|
||||
|
||||
public int getY() {
|
||||
return Y;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* @return the z
|
||||
*/
|
||||
*//*
|
||||
|
||||
public int getZ() {
|
||||
return Z;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
*//*
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
// I am overriding the inherited hashCode method.
|
||||
// Because it doesn't know how to deal with my custom data.
|
||||
// So instead of getting who knows what, we return valid data
|
||||
|
||||
final int prime = 31; // My hard coded prime number
|
||||
int result = 1; // The hard coded number I start with
|
||||
result = (prime * result) + X; // Add the X data
|
||||
result = (prime * result) + Y; // Add the Y data
|
||||
result = (prime * result) + Z; // Add the Z data
|
||||
return result; //this result will consistently give the same result for the same data.
|
||||
final int prime = 31; // My hard coded prime number
|
||||
int result = 1; // The hard coded number I start with
|
||||
result = (prime * result) + X; // Add the X data
|
||||
result = (prime * result) + Y; // Add the Y data
|
||||
result = (prime * result) + Z; // Add the Z data
|
||||
return result; //this result will consistently give the same result for the same data.
|
||||
// [0,0,0] will always give 29791. [1,2,3] will always give 30817.
|
||||
//yes, If I was lazy, I could just do a "return 0;" and it would still be technically valid.
|
||||
//but if I'm going override the method, I might as well do it right...
|
||||
}
|
||||
|
||||
/**
|
||||
* @param x
|
||||
* the x to set
|
||||
*/
|
||||
*/
|
||||
/**
|
||||
* @param x the x to set
|
||||
*//*
|
||||
|
||||
public void setX(final int x) {
|
||||
X = x;
|
||||
}
|
||||
@ -265,25 +248,30 @@ public class Coordinates {
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
// Java Language Specific Crap Below... Stuff *gotta* be there so Java won't cry... //
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* @param y
|
||||
* the y to set
|
||||
*/
|
||||
|
||||
*/
|
||||
/**
|
||||
* @param y the y to set
|
||||
*//*
|
||||
|
||||
public void setY(final int y) {
|
||||
Y = y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param z
|
||||
* the z to set
|
||||
*/
|
||||
*/
|
||||
/**
|
||||
* @param z the z to set
|
||||
*//*
|
||||
|
||||
public void setZ(final int z) {
|
||||
Z = z;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
*/
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
*//*
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// I am overriding the inherited toString method.
|
||||
@ -296,21 +284,19 @@ public class Coordinates {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @param Short
|
||||
* @return
|
||||
*/
|
||||
*//*
|
||||
|
||||
public String toString(final boolean Short) {
|
||||
if (Short) { // We are overloading toString with an additional option:
|
||||
return ("(" + X + "," + Z + ")"); // Basically just an option to return just X and Z (formatted differently as well: "(X,Z)")
|
||||
if (Short) { // We are overloading toString with an additional option:
|
||||
return ("(" + X + "," + Z + ")"); // Basically just an option to return just X and Z (formatted differently as well: "(X,Z)")
|
||||
}
|
||||
return toString(); // Idiot catch. default to: "[X,Y,Z]"
|
||||
return toString(); // Idiot catch. default to: "[X,Y,Z]"
|
||||
|
||||
}
|
||||
public static Coordinates parse(String coords){
|
||||
String [] splitted = coords.substring(1,coords.length()-2).trim().split(",");
|
||||
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ package morlok8k.MinecraftLandGenerator;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector3i;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@ -30,23 +32,21 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class FileRead {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
*/
|
||||
|
||||
private static Log log = LogFactory.getLog(Main.class);
|
||||
|
||||
public static ArrayList<Coordinates> readArrayListCoordLog(final String file) {
|
||||
public static ArrayList<Vector3i> readArrayListCoordLog(final String file) {
|
||||
|
||||
|
||||
final ArrayList<Coordinates> Return = new ArrayList<>();
|
||||
final ArrayList<Vector3i> Return = new ArrayList<>();
|
||||
|
||||
try {
|
||||
final BufferedReader in = new BufferedReader(new FileReader(new File(file)));
|
||||
@ -58,21 +58,21 @@ public class FileRead {
|
||||
|
||||
int end = line.indexOf('#'); // comments, ignored lines
|
||||
boolean ignoreLine = false;
|
||||
Coordinates c = new Coordinates();
|
||||
Vector3i c;
|
||||
|
||||
if (end == -1) { // If we have no hash sign, then we read till the end of the line
|
||||
end = line.length();
|
||||
}
|
||||
|
||||
if (end == 0) { //hash is first char, meaning entire line is a comment
|
||||
if (end == 0) { //hash is first char, meaning entire line is a comment
|
||||
ignoreLine = true;
|
||||
}
|
||||
|
||||
if (!(ignoreLine)) {
|
||||
c = Coordinates.parseString(line.substring(0, end));
|
||||
c = parseString(line.substring(0, end));
|
||||
Return.add(c);
|
||||
} else {
|
||||
if (line.startsWith("##Size:")) { // Potential Resume data.
|
||||
if (line.startsWith("##Size:")) { // Potential Resume data.
|
||||
int xx = 0;
|
||||
int zz = 0;
|
||||
|
||||
@ -100,8 +100,8 @@ public class FileRead {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
*
|
||||
*/
|
||||
public static void readConf() {
|
||||
//TODO: element comment
|
||||
//String errorMsg = "";
|
||||
@ -127,7 +127,7 @@ public class FileRead {
|
||||
pos = -1;
|
||||
}
|
||||
|
||||
if (end == 0) { //hash is first char, meaning entire line is a comment
|
||||
if (end == 0) { //hash is first char, meaning entire line is a comment
|
||||
end = line.length();
|
||||
pos = 0;
|
||||
}
|
||||
@ -218,4 +218,27 @@ public class FileRead {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector3i parseString(String StringOfCoords) {
|
||||
StringOfCoords = StringOfCoords.trim();
|
||||
|
||||
int start = StringOfCoords.indexOf("[");
|
||||
int end = StringOfCoords.indexOf("]");
|
||||
|
||||
String[] coordlong = StringOfCoords.substring(start, end).split(",");
|
||||
if ((start == -1) || (end == -1)) {
|
||||
|
||||
start = StringOfCoords.indexOf("(");
|
||||
end = StringOfCoords.indexOf(")");
|
||||
String[] coordshort = StringOfCoords.substring(start, end).split(",");
|
||||
if ((start != -1) && (end != -1)) {
|
||||
return new Vector3i(Integer.valueOf(coordshort[0]), 64, Integer.valueOf(coordshort[2]));
|
||||
} else {
|
||||
return new Vector3i(0, 0, 0);
|
||||
}
|
||||
} else {
|
||||
|
||||
return new Vector3i(Integer.valueOf(coordlong[0]), Integer.valueOf(coordlong[1]), Integer.valueOf(coordlong[2]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ import java.util.logging.Logger;
|
||||
import morlok8k.MinecraftLandGenerator.GUI.MLG_GUI;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.joml.Vector3i;
|
||||
|
||||
|
||||
/**
|
||||
@ -206,7 +207,7 @@ public class Main {
|
||||
log.info("Backing up level.dat to level_backup.dat.\n");
|
||||
Misc.copyFile(serverLevel, backupLevel);
|
||||
|
||||
final Coordinates spawn = SpawnPoint.getSpawn(serverLevel);
|
||||
final Vector3i spawn = SpawnPoint.getSpawn(serverLevel);
|
||||
log.info("Spawn point detected: [X,Y,Z] " + spawn);
|
||||
|
||||
FileWrite.AppendTxtFile(var.worldPath + var.fileSeparator + var.logFile, "# Seed: "
|
||||
@ -214,12 +215,12 @@ public class Main {
|
||||
|
||||
boolean overridden = false;
|
||||
if (var.xOffset == null) {
|
||||
var.xOffset = spawn.getX();
|
||||
var.xOffset = spawn.x;
|
||||
} else {
|
||||
overridden = true;
|
||||
}
|
||||
if (var.zOffset == null) {
|
||||
var.zOffset = spawn.getZ();
|
||||
var.zOffset = spawn.z;
|
||||
} else {
|
||||
overridden = true;
|
||||
}
|
||||
@ -352,7 +353,7 @@ public class Main {
|
||||
|
||||
Long timeTracking;
|
||||
|
||||
ArrayList<Coordinates> launchList = new ArrayList<>(0);
|
||||
ArrayList<Vector3i> launchList = new ArrayList<>(0);
|
||||
try {
|
||||
launchList = new ArrayList<>((int) totalIterations);
|
||||
} catch (Exception e1) {
|
||||
@ -405,8 +406,8 @@ public class Main {
|
||||
}
|
||||
|
||||
// add Coordinates to arraylist here
|
||||
final Coordinates tempCoords =
|
||||
new Coordinates((int) currentX + var.xOffset, 64, (int) currentZ
|
||||
final Vector3i tempCoords =
|
||||
new Vector3i((int) currentX + var.xOffset, 64, (int) currentZ
|
||||
+ var.zOffset);
|
||||
launchList.add(tempCoords);
|
||||
|
||||
@ -448,7 +449,7 @@ public class Main {
|
||||
+ pD + "% Done)");
|
||||
|
||||
//get existing list, and remove this list from launchList
|
||||
final ArrayList<Coordinates> removeList =
|
||||
final ArrayList<Vector3i> removeList =
|
||||
FileRead.readArrayListCoordLog(var.worldPath + var.fileSeparator + var.logFile);
|
||||
|
||||
log.info("Removing known generated areas...");
|
||||
@ -462,8 +463,8 @@ public class Main {
|
||||
|
||||
currentIteration = 0;
|
||||
totalIterations = launchList.size();
|
||||
Coordinates xyz = null;
|
||||
final Iterator<Coordinates> coordArrayIterator = launchList.iterator();
|
||||
Vector3i xyz = null;
|
||||
final Iterator<Vector3i> coordArrayIterator = launchList.iterator();
|
||||
while (coordArrayIterator.hasNext()) {
|
||||
currentIteration++;
|
||||
xyz = coordArrayIterator.next();
|
||||
|
@ -21,6 +21,7 @@ package morlok8k.MinecraftLandGenerator;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.joml.Vector3i;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@ -83,7 +84,7 @@ public class Misc {
|
||||
}
|
||||
final File level = new File(var.worldPath + var.fileSeparator + "level.dat");
|
||||
try {
|
||||
final Coordinates spawn = SpawnPoint.getSpawn(level);
|
||||
final Vector3i spawn = SpawnPoint.getSpawn(level);
|
||||
log.info("The current spawn point is: [X,Y,Z] " + spawn);
|
||||
return true;
|
||||
} catch (final IOException ex) {
|
||||
|
@ -33,6 +33,7 @@ import org.jnbt.LongTag;
|
||||
import org.jnbt.NBTInputStream;
|
||||
import org.jnbt.NBTOutputStream;
|
||||
import org.jnbt.Tag;
|
||||
import org.joml.Vector3i;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -47,7 +48,7 @@ public class SpawnPoint {
|
||||
* @throws IOException
|
||||
* @author Corrodias
|
||||
*/
|
||||
protected static Coordinates getSpawn(final File level) throws IOException {
|
||||
protected static Vector3i getSpawn(final File level) throws IOException {
|
||||
try {
|
||||
final NBTInputStream input = new NBTInputStream(new FileInputStream(level));
|
||||
final CompoundTag originalTopLevelTag = (CompoundTag) input.readTag();
|
||||
@ -68,8 +69,8 @@ public class SpawnPoint {
|
||||
var.randomSeed = Seed.getValue();
|
||||
System.out.println("Seed: " + var.randomSeed); // lets output the seed, cause why not?
|
||||
|
||||
final Coordinates ret =
|
||||
new Coordinates(spawnX.getValue(), spawnY.getValue(), spawnZ.getValue());
|
||||
final Vector3i ret =
|
||||
new Vector3i(spawnX.getValue(), spawnY.getValue(), spawnZ.getValue());
|
||||
return ret;
|
||||
} catch (final ClassCastException ex) {
|
||||
throw new IOException("Invalid level format.");
|
||||
@ -91,7 +92,7 @@ public class SpawnPoint {
|
||||
* if there are any problems reading/writing the file
|
||||
* @author Corrodias
|
||||
*/
|
||||
protected static void setSpawn(final File level, final Coordinates xyz) throws IOException {
|
||||
protected static void setSpawn(final File level, final Vector3i xyz) throws IOException {
|
||||
|
||||
try {
|
||||
final NBTInputStream input = new NBTInputStream(new FileInputStream(level));
|
||||
@ -141,9 +142,9 @@ public class SpawnPoint {
|
||||
@SuppressWarnings("unused")
|
||||
final IntTag spawnZ = (IntTag) newData.get("SpawnZ"); // I don't want to remove existing code, either by myself (Morlok8k) or Corrodias
|
||||
|
||||
newData.put("SpawnX", new IntTag("SpawnX", xyz.getX())); // pulling the data out of the Coordinates,
|
||||
newData.put("SpawnY", new IntTag("SpawnY", xyz.getY())); // and putting it into our IntTag's
|
||||
newData.put("SpawnZ", new IntTag("SpawnZ", xyz.getZ()));
|
||||
newData.put("SpawnX", new IntTag("SpawnX", xyz.x)); // pulling the data out of the Coordinates,
|
||||
newData.put("SpawnY", new IntTag("SpawnY", xyz.y)); // and putting it into our IntTag's
|
||||
newData.put("SpawnZ", new IntTag("SpawnZ", xyz.z));
|
||||
|
||||
// Again, we can't modify the data map in the old Tag, so we have to make a new one.
|
||||
final CompoundTag newDataTag = new CompoundTag("Data", newData);
|
||||
|
Reference in New Issue
Block a user