Added picocli

This commit is contained in:
sommerlilie 2018-11-13 19:14:16 +01:00
parent dd331c3f3f
commit 3a36fe2013
5 changed files with 491 additions and 434 deletions

267
.idea/workspace.xml generated
View File

@ -2,8 +2,11 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="6303f571-4608-4678-b04c-0c6cb20f921f" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/CommandLineMain.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/MLG-BuildID" beforeDir="false" afterPath="$PROJECT_DIR$/MLG-BuildID" 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" />
</list>
<ignored path="$PROJECT_DIR$/bin/" />
<ignored path="$PROJECT_DIR$/target/" />
@ -17,41 +20,45 @@
<session id="-324306844">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.closed" value="11" />
<entry key="project.closed" value="14" />
<entry key="project.open.time.1" value="1" />
<entry key="project.open.time.14" value="1" />
<entry key="project.open.time.15" value="1" />
<entry key="project.open.time.16" value="2" />
<entry key="project.open.time.16" value="3" />
<entry key="project.open.time.19" value="1" />
<entry key="project.open.time.2" value="2" />
<entry key="project.open.time.20" value="1" />
<entry key="project.open.time.21" value="3" />
<entry key="project.open.time.3" value="1" />
<entry key="project.open.time.4" value="2" />
<entry key="project.opened" value="13" />
<entry key="project.opened" value="16" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="0-SNAPSHOT" value="3" />
<entry key="java" value="84" />
<entry key="conf" value="1" />
<entry key="java" value="87" />
<entry key="xml" value="2" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="JAVA" value="84" />
<entry key="HOCON" value="1" />
<entry key="JAVA" value="87" />
<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="1992" />
<entry key="java" value="2333" />
<entry key="xml" value="19" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="JAVA" value="1992" />
<entry key="JAVA" value="2333" />
<entry key="XML" value="19" />
</counts>
</usages-collector>
@ -62,11 +69,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="178">
<caret line="495" column="49" selection-start-line="495" selection-start-column="49" selection-end-line="495" selection-end-column="49" />
<folding>
<element signature="imports" expanded="true" />
</folding>
<state relative-caret-position="176">
<caret line="29" column="27" selection-start-line="29" selection-start-column="27" selection-end-line="29" selection-end-column="27" />
</state>
</provider>
</entry>
@ -74,7 +78,7 @@
<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">
<state relative-caret-position="801">
<caret line="38" selection-start-line="38" selection-end-line="38" />
</state>
</provider>
@ -83,7 +87,7 @@
<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="248">
<state relative-caret-position="801">
<caret line="140" column="22" selection-start-line="140" selection-start-column="22" selection-end-line="140" selection-end-column="22" />
</state>
</provider>
@ -92,20 +96,8 @@
<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="2" selection-start-line="301" selection-start-column="2" selection-end-line="301" selection-end-column="2" />
<folding>
<element signature="e#0#7088#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Arraylist.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="726">
<caret line="50" selection-start-line="50" selection-end-line="50" />
<state relative-caret-position="22">
<caret line="302" selection-start-line="302" selection-end-line="302" />
</state>
</provider>
</entry>
@ -113,8 +105,21 @@
<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="534">
<caret line="146" column="60" selection-start-line="146" selection-start-column="60" selection-end-line="146" selection-end-column="60" />
<state relative-caret-position="1799">
<caret line="161" column="9" lean-forward="true" selection-start-line="161" selection-start-column="9" selection-end-line="161" selection-end-column="9" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/CommandLineMain.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-616">
<caret line="2" column="34" lean-forward="true" selection-start-line="2" selection-start-column="34" selection-end-line="2" selection-end-column="34" />
<folding>
<element signature="e#904#905#0" expanded="true" />
<element signature="e#946#947#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -122,24 +127,8 @@
<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>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-3782">
<caret line="35" column="13" selection-start-line="35" selection-start-column="13" selection-end-line="35" selection-end-column="13" />
<folding>
<element signature="e#0#6897#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
<state relative-caret-position="677">
<caret line="61" column="49" selection-start-line="61" selection-start-column="49" selection-end-line="61" selection-end-column="49" />
</state>
</provider>
</entry>
@ -147,17 +136,26 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/DownloadFile.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="66">
<state relative-caret-position="198">
<caret line="33" column="13" selection-start-line="33" selection-start-column="13" selection-end-line="33" selection-end-column="13" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Time.java">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/var.java">
<provider selected="true" editor-type-id="text-editor">
<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 relative-caret-position="-1254">
<caret line="43" column="42" lean-forward="true" selection-start-line="43" selection-start-column="42" selection-end-line="43" selection-end-column="42" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/MinecraftLandGenerator.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="14" column="17" lean-forward="true" selection-start-line="14" selection-start-column="17" selection-end-line="14" selection-end-column="17" />
</state>
</provider>
</entry>
@ -231,9 +229,10 @@
<option value="$PROJECT_DIR$/pom.xml" />
<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/FileRead.java" />
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Main.java" />
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java" />
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java" />
<option value="$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/CommandLineMain.java" />
</list>
</option>
</component>
@ -283,7 +282,7 @@
<select />
</treeState>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<component name="ProjectFrameBounds" extendedState="7">
<option name="x" value="960" />
<option name="y" value="28" />
<option name="width" value="950" />
@ -297,6 +296,7 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
@ -350,11 +350,16 @@
<item name="MinecraftLandGenerator" type="462c0819:PsiDirectoryNode" />
<item name="zip" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="MinecraftLandGenerator" type="b2602c69:ProjectViewProjectNode" />
<item name="MinecraftLandGenerator" type="462c0819:PsiDirectoryNode" />
<item name="zip" type="462c0819:PsiDirectoryNode" />
<item name="Archive" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
@ -464,6 +469,9 @@
<workItem from="1541424668898" duration="45000" />
<workItem from="1541864532203" duration="4577000" />
<workItem from="1541964344032" duration="2472000" />
<workItem from="1542023345146" duration="1198000" />
<workItem from="1542129590076" duration="39000" />
<workItem from="1542129672857" duration="3140000" />
</task>
<servers />
</component>
@ -482,20 +490,20 @@
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="33036000" />
<option name="totallyTimeSpent" value="37486000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="28" width="1920" height="1052" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49834436" visible="true" weight="0.18162394" />
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49834436" visible="true" weight="0.18803419" />
<window_info id="Structure" order="1" sideWeight="0.50165564" side_tool="true" weight="0.18162394" />
<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.30555555" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.3288889" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32786885" />
<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" />
@ -505,7 +513,7 @@
<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.3288889" />
<window_info anchor="bottom" id="Messages" order="12" sideWeight="0.49839744" weight="0.32786885" />
<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" />
@ -651,9 +659,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="308">
<caret line="52" column="21" selection-start-line="52" selection-start-column="21" selection-end-line="52" selection-end-column="21" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -668,16 +673,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-167">
<caret line="693" lean-forward="true" selection-start-line="693" selection-end-line="693" />
<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">
<caret line="179" column="6" selection-start-line="179" selection-start-column="6" selection-end-line="179" selection-end-column="6" />
</state>
</provider>
</entry>
@ -692,9 +687,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="440">
<caret line="38" selection-start-line="38" selection-end-line="38" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -705,47 +697,6 @@
</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="2002">
<caret line="108" column="20" selection-start-line="108" selection-start-column="20" selection-end-line="108" selection-end-column="20" />
</state>
</provider>
</entry>
<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>
<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="178">
<caret line="495" column="49" selection-start-line="495" selection-start-column="49" selection-end-line="495" selection-end-column="49" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Arraylist.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="726">
@ -753,37 +704,93 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="6534">
<caret line="301" column="2" selection-start-line="301" selection-start-column="2" selection-end-line="301" selection-end-column="2" />
<state relative-caret-position="198">
<caret line="35" column="13" selection-start-line="35" selection-start-column="13" selection-end-line="35" selection-end-column="13" />
<folding>
<element signature="e#0#7088#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/DownloadFile.java">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Time.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="66">
<caret line="33" column="13" selection-start-line="33" selection-start-column="13" selection-end-line="33" selection-end-column="13" />
<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>
</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="176">
<caret line="29" column="27" selection-start-line="29" selection-start-column="27" selection-end-line="29" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="801">
<caret line="38" selection-start-line="38" selection-end-line="38" />
</state>
</provider>
</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="248">
<state relative-caret-position="801">
<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/FileRead.java">
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-3782">
<caret line="35" column="13" selection-start-line="35" selection-start-column="13" selection-end-line="35" selection-end-column="13" />
<state relative-caret-position="22">
<caret line="302" selection-start-line="302" selection-end-line="302" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/DownloadFile.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="33" column="13" selection-start-line="33" selection-start-column="13" selection-end-line="33" selection-end-column="13" />
</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="677">
<caret line="61" column="49" selection-start-line="61" selection-start-column="49" selection-end-line="61" selection-end-column="49" />
</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="-1254">
<caret line="43" column="42" lean-forward="true" selection-start-line="43" selection-start-column="42" selection-end-line="43" selection-end-column="42" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/MinecraftLandGenerator.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="14" column="17" lean-forward="true" selection-start-line="14" selection-start-column="17" selection-end-line="14" selection-end-column="17" />
</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="1799">
<caret line="161" column="9" lean-forward="true" selection-start-line="161" selection-start-column="9" selection-end-line="161" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/morlok8k/MinecraftLandGenerator/CommandLineMain.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-616">
<caret line="2" column="34" lean-forward="true" selection-start-line="2" selection-start-column="34" selection-end-line="2" selection-end-column="34" />
<folding>
<element signature="e#0#6897#0" expanded="true" />
<element signature="imports" expanded="true" />
<element signature="e#904#905#0" expanded="true" />
<element signature="e#946#947#0" expanded="true" />
</folding>
</state>
</provider>

View File

@ -67,4 +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
72E64BD3C21E559B909A995F38E92C24=1542019123000# MLG v1.7.7 (Class File, Not .Jar)
0E579FCDFAC99EE49E3C11D26FFDC3C6=1542129713000# MLG v1.7.7 (Class File, Not .Jar)

View File

@ -0,0 +1,51 @@
package morlok8k.MinecraftLandGenerator;
import picocli.CommandLine.Option;
import picocli.CommandLine.Parameters;
import picocli.CommandLine;
import picocli.CommandLine.RunLast;
import picocli.CommandLine.Command;
import picocli.CommandLine.HelpCommand;
import java.nio.file.Path;
@Command(name = "mgl", subcommands = {
HelpCommand.class})
public class CommandLineMain implements Runnable{
@Option(names = {"-v", "--verbose"}, description = "Be verbose.")
private boolean verbose = false;
@Parameters(index = "0", description = "X-coordinate")
private int X;
@Parameters(index = "1", description = "Z-coordinate")
private int Z;
@Parameters(index = "2", description = "path to the directory in which the server runs")
private Path serverPath;
@Option(names = "-i", description = "override the iteration spawn offset increment")
private int increment = 380;
@Option(names = "-i", description = "set the X offset to generate land around")
private int xOffset = 0;
@Option(names = "-i", description = "set the Z offset to generate land around")
private int zOffset = 0;
public CommandLineMain(){
}
@Override
public void run() {
CommandLine.usage(this, System.err);
}
public static void main(String[] args) {
CommandLine cli = new CommandLine(new CommandLineMain());
cli.parseWithHandler(new RunLast(), args);
}
}

View File

@ -1,302 +1,302 @@
/*
* ####################################################################### # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE # # Version 2, December 2004 # # # # Copyright (C) 2004 Sam Hocevar
* <sam@hocevar.net> # # # # Everyone is permitted to copy and distribute verbatim or modified # # copies of this license document, and changing it is allowed as long # # as the name is changed. # # #
* # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE # # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION # # # # 0. You just DO WHAT THE FUCK YOU WANT TO. # # #
* #######################################################################
*/
//package morlok8k.MinecraftLandGenerator;
import org.joml.Vector3i;
/**
* Coordinates are in the form of [X,Y,Z] or (X,Z)<br>
* <br>
* x-axis (longitude): the distance east (positive) or west (negative) of the origin point<br>
* z-axis (latitude): the distance south (positive) or north (negative) of the origin point<br>
* y-axis (elevation): how high or low (from 0 to 255 (previously 128), with 64 being sea level) <br>
* The origin point: When both X and Z are both zero. (elevation is irrelevant)<br>
*/
//public class Coordinates {
/*
*/
/**
* 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
* @return
* @author Morlok8k
*//*
*/
/* public static Vector3i parseString(String StringOfCoords) {
//parse out string
StringOfCoords = StringOfCoords.trim();
int x = 0, y = 0, z = 0;
int start, end;
String sX = "", sY = "", sZ = "";
boolean shortMode = false, notCoords = false;
start = StringOfCoords.indexOf("[");
end = StringOfCoords.indexOf("]");
if ((start == -1) || (end == -1)) {
start = StringOfCoords.indexOf("(");
end = StringOfCoords.indexOf(")");
if ((start != -1) && (end != -1)) {
shortMode = true;
} else {
notCoords = true;
}
}
if (notCoords) {
return new Vector3i(0, 0, 0);
}
String[] coords = StringOfCoords.substring(start, end).split(",");
if (shortMode) {
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);
// firstComma = StringOfCoords.indexOf(",");
// secComma = StringOfCoords.lastIndexOf(",");
// 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);
//}
//return new Coordinates(x, y, z);
}
/**
*
*//*
*/
/* 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;
Y = y;
Z = z;
}
*/
/**
*
*//*
public void clear() {
X = 0;
Y = 0;
Z = 0;
}
*/
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*//*
@SuppressWarnings({"unused", "null"})
@Override
public boolean equals(final Object obj) {
// I am overriding the inherited equals method.
// Because it doesn't know how to deal with my custom data.
// So instead of always failing, it actually works!
// (by default it gets the memory addresses of each object.)
// An object must equal itself
if (this == obj) {
return true;
}
// No object equals null
if (obj == null) {
return false;
}
if (this == null) {
return false;
}
// Objects of different types are never equal
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!
}
*/
/**
* @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)
* @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.
// [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
*//*
public void setX(final int x) {
X = x;
}
///////////////////////////////////////////////////////////////////////////////////////
// Java Language Specific Crap Below... Stuff *gotta* be there so Java won't cry... //
///////////////////////////////////////////////////////////////////////////////////////
*/
/**
* @param y the y to set
*//*
public void setY(final int y) {
Y = y;
}
*/
/**
* @param z the z to set
*//*
public void setZ(final int z) {
Z = z;
}
*/
/* (non-Javadoc)
* @see java.lang.Object#toString()
*//*
@Override
public String toString() {
// I am overriding the inherited toString method.
// Because it doesn't know how to deal with my custom data.
// So instead of getting "blahblahblah.Coordinates@745f"
// (the location of the class and the hexstring of the hashcode)
// I return "[X,Y,Z]"
return ("[" + X + "," + Y + "," + Z + "]");
}
*/
/**
* @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)")
}
return toString(); // Idiot catch. default to: "[X,Y,Z]"
}
*/
//}
///*
// * ####################################################################### # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE # # Version 2, December 2004 # # # # Copyright (C) 2004 Sam Hocevar
// * <sam@hocevar.net> # # # # Everyone is permitted to copy and distribute verbatim or modified # # copies of this license document, and changing it is allowed as long # # as the name is changed. # # #
// * # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE # # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION # # # # 0. You just DO WHAT THE FUCK YOU WANT TO. # # #
// * #######################################################################
// */
//
////package morlok8k.MinecraftLandGenerator;
//
//import org.joml.Vector3i;
//
///**
// * Coordinates are in the form of [X,Y,Z] or (X,Z)<br>
// * <br>
// * x-axis (longitude): the distance east (positive) or west (negative) of the origin point<br>
// * z-axis (latitude): the distance south (positive) or north (negative) of the origin point<br>
// * y-axis (elevation): how high or low (from 0 to 255 (previously 128), with 64 being sea level) <br>
// * The origin point: When both X and Z are both zero. (elevation is irrelevant)<br>
// */
////public class Coordinates {
///*
//
// */
///**
// * 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
// * @return
// * @author Morlok8k
// *//*
//
//
//*/
///* public static Vector3i parseString(String StringOfCoords) {
// //parse out string
// StringOfCoords = StringOfCoords.trim();
//
// int x = 0, y = 0, z = 0;
//
// int start, end;
// String sX = "", sY = "", sZ = "";
// boolean shortMode = false, notCoords = false;
//
// start = StringOfCoords.indexOf("[");
// end = StringOfCoords.indexOf("]");
//
// if ((start == -1) || (end == -1)) {
// start = StringOfCoords.indexOf("(");
// end = StringOfCoords.indexOf(")");
//
// if ((start != -1) && (end != -1)) {
// shortMode = true;
// } else {
// notCoords = true;
// }
// }
//
// if (notCoords) {
// return new Vector3i(0, 0, 0);
// }
//
// String[] coords = StringOfCoords.substring(start, end).split(",");
// if (shortMode) {
// 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);
//
// // firstComma = StringOfCoords.indexOf(",");
// // secComma = StringOfCoords.lastIndexOf(",");
//
// // 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);
// //}
//
// //return new Coordinates(x, y, z);
// }
//
// /**
// *
// *//*
//
//*/
///* 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;
// Y = y;
// Z = z;
// }
//
// */
///**
// *
// *//*
//
// public void clear() {
// X = 0;
// Y = 0;
// Z = 0;
// }
//
// */
///* (non-Javadoc)
// * @see java.lang.Object#equals(java.lang.Object)
// *//*
//
// @SuppressWarnings({"unused", "null"})
// @Override
// public boolean equals(final Object obj) {
// // I am overriding the inherited equals method.
// // Because it doesn't know how to deal with my custom data.
// // So instead of always failing, it actually works!
// // (by default it gets the memory addresses of each object.)
//
// // An object must equal itself
// if (this == obj) {
// return true;
// }
//
// // No object equals null
// if (obj == null) {
// return false;
// }
// if (this == null) {
// return false;
// }
//
// // Objects of different types are never equal
// 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!
// }
//
// */
///**
// * @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)
// * @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.
// // [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
// *//*
//
// public void setX(final int x) {
// X = x;
// }
//
// ///////////////////////////////////////////////////////////////////////////////////////
// // Java Language Specific Crap Below... Stuff *gotta* be there so Java won't cry... //
// ///////////////////////////////////////////////////////////////////////////////////////
//
// */
///**
// * @param y the y to set
// *//*
//
// public void setY(final int y) {
// Y = y;
// }
//
// */
///**
// * @param z the z to set
// *//*
//
// public void setZ(final int z) {
// Z = z;
// }
//
// */
///* (non-Javadoc)
// * @see java.lang.Object#toString()
// *//*
//
// @Override
// public String toString() {
// // I am overriding the inherited toString method.
// // Because it doesn't know how to deal with my custom data.
// // So instead of getting "blahblahblah.Coordinates@745f"
// // (the location of the class and the hexstring of the hashcode)
// // I return "[X,Y,Z]"
//
// return ("[" + X + "," + Y + "," + Z + "]");
//
// }
//
// */
///**
// * @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)")
// }
// return toString(); // Idiot catch. default to: "[X,Y,Z]"
//
// }
//
//*/
////}

View File

@ -27,7 +27,6 @@ import java.awt.EventQueue;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.logging.Level;