From 81bd9ea58841c4a9685cc3db7e416ece84093e08 Mon Sep 17 00:00:00 2001 From: Nekojimi Date: Sun, 16 Oct 2022 12:58:51 +0100 Subject: [PATCH] Add templated IDEA project. --- .gitignore | 1 - .idea/.gitignore | 3 ++ .idea/compiler.xml | 6 ++++ .idea/gradle.xml | 17 +++++++++++ .idea/jarRepositories.xml | 30 +++++++++++++++++++ .idea/misc.xml | 5 ++++ .idea/runConfigurations/runClient.xml | 17 +++++++++++ .idea/runConfigurations/runData.xml | 18 +++++++++++ .idea/runConfigurations/runGameTestServer.xml | 18 +++++++++++ .idea/runConfigurations/runServer.xml | 18 +++++++++++ .idea/vcs.xml | 6 ++++ build.gradle | 12 ++++---- src/main/resources/META-INF/mods.toml | 8 ++--- src/main/resources/pack.mcmeta | 2 +- 14 files changed, 149 insertions(+), 12 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/compiler.xml create mode 100644 .idea/gradle.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/runConfigurations/runClient.xml create mode 100644 .idea/runConfigurations/runData.xml create mode 100644 .idea/runConfigurations/runGameTestServer.xml create mode 100644 .idea/runConfigurations/runServer.xml create mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore index 59898ca..74aea10 100644 --- a/.gitignore +++ b/.gitignore @@ -45,5 +45,4 @@ hs_err_pid* replay_pid* **/run/ -.idea/ *~ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..b589d56 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..438f246 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..74553fb --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..668048d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/runClient.xml b/.idea/runConfigurations/runClient.xml new file mode 100644 index 0000000..b07abe3 --- /dev/null +++ b/.idea/runConfigurations/runClient.xml @@ -0,0 +1,17 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/runData.xml b/.idea/runConfigurations/runData.xml new file mode 100644 index 0000000..7acb3be --- /dev/null +++ b/.idea/runConfigurations/runData.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/.idea/runConfigurations/runGameTestServer.xml b/.idea/runConfigurations/runGameTestServer.xml new file mode 100644 index 0000000..002e6d5 --- /dev/null +++ b/.idea/runConfigurations/runGameTestServer.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/.idea/runConfigurations/runServer.xml b/.idea/runConfigurations/runServer.xml new file mode 100644 index 0000000..cd46c20 --- /dev/null +++ b/.idea/runConfigurations/runServer.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index b6cc936..d8d5cf8 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ minecraft { property 'forge.enabledGameTestNamespaces', '${REPO_NAME_PASCAL}' mods { - examplemod { + ${REPO_NAME_LOWER} { source sourceSets.main } } @@ -87,7 +87,7 @@ minecraft { property 'forge.enabledGameTestNamespaces', '${REPO_NAME_PASCAL}' mods { - examplemod { + ${REPO_NAME_LOWER} { source sourceSets.main } } @@ -101,10 +101,10 @@ minecraft { property 'forge.logging.console.level', 'debug' // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. - args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') + args '--mod', '${REPO_NAME_LOWER}', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') mods { - examplemod { + ${REPO_NAME_LOWER} { source sourceSets.main } } @@ -149,11 +149,11 @@ jar { manifest { attributes([ "Specification-Title" : "${REPO_NAME_PASCAL}", - "Specification-Vendor" : "examplemodsareus", + "Specification-Vendor" : "${REPO_NAME_LOWER}sareus", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "examplemodsareus", + "Implementation-Vendor" : "${REPO_NAME_LOWER}sareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index a64d209..46d2759 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -15,7 +15,7 @@ license="All rights reserved" # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod -modId="examplemod" #mandatory +modId="${REPO_NAME_LOWER}" #mandatory # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it # ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata # see the associated build.gradle script for how to populate this completely automatically during a build @@ -27,7 +27,7 @@ displayName="Example Mod" #mandatory # A URL for the "homepage" for this mod, displayed in the mod UI #displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional # A file name (in the root of the mod JAR) containing a logo for display -logoFile="examplemod.png" #optional +logoFile="${REPO_NAME_LOWER}.png" #optional # A text field displayed in the mod UI credits="Thanks for this example mod goes to Java" #optional # A text field displayed in the mod UI @@ -49,7 +49,7 @@ Have some lorem ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. ''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. -[[dependencies.examplemod]] #optional +[[dependencies.${REPO_NAME_LOWER}]] #optional # the modid of the dependency modId="forge" #mandatory # Does this dependency have to exist - if not, ordering below must be specified @@ -61,7 +61,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magn # Side this dependency is applied on - BOTH, CLIENT or SERVER side="BOTH" # Here's another dependency -[[dependencies.examplemod]] +[[dependencies.${REPO_NAME_LOWER}]] modId="minecraft" mandatory=true # This version range declares a minimum of the current minecraft version up to but not including the next major version diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index b643e13..5d486ce 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "examplemod resources", + "description": "${REPO_NAME_LOWER} resources", "pack_format": 9, "forge:resource_pack_format": 9, "forge:data_pack_format": 10