Skip to content

Commit

Permalink
fix: cant launch
Browse files Browse the repository at this point in the history
  • Loading branch information
gloridifice committed Jun 18, 2024
1 parent ac162c9 commit 0543ae7
Show file tree
Hide file tree
Showing 65 changed files with 1,071 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ hs_err_*.log
replay_*.log
*.hprof
*.jfr
/src/main/generated/
/src/main/generated/.cache/

# kotlin
.kotlin/
162 changes: 84 additions & 78 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,123 +1,129 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
id "org.jetbrains.kotlin.jvm" version "2.0.0"
id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.0'
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
id "org.jetbrains.kotlin.jvm" version "2.0.0"
id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.0'

}

version = project.mod_version + "+" + project.mc_version + "-fabric" + "-" + project.build_state
group = project.maven_group

base {
archivesName = project.archives_base_name
archivesName = project.archives_base_name
}

repositories {
maven {
name = 'Xander Maven'
url = 'https://maven.isxander.dev/releases'
}
maven {
// location of the maven that hosts JEI files before January 2023
name = "Progwml6's maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of the maven that hosts JEI files since January 2023
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.dev"
}
maven {
name = 'Xander Maven'
url = 'https://maven.isxander.dev/releases'
}
maven {
// location of the maven that hosts JEI files before January 2023
name = "Progwml6's maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of the maven that hosts JEI files since January 2023
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.dev"
}
}

loom {
splitEnvironmentSourceSets()

mods {
"watersource" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}
mods {
"watersource" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}
}

fabricApi {
configureDataGeneration()
configureDataGeneration()
}

dependencies {
minecraft "com.mojang:minecraft:${project.mc_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0'

modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"

// toml
implementation 'com.akuleshov7:ktoml-core:0.5.1'
implementation 'com.akuleshov7:ktoml-file:0.5.1'
minecraft "com.mojang:minecraft:${project.mc_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"

modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"

// toml
include(implementation 'com.akuleshov7:ktoml-core-jvm:0.5.1')
include(implementation 'com.akuleshov7:ktoml-file-jvm:0.5.1')
include(implementation 'com.akuleshov7:ktoml-source-jvm:0.5.1')
include(implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.6.0')
include(implementation 'com.squareup.okio:okio-jvm:3.1.0')

// compile against the JEI API but do not include it at runtime
modCompileOnlyApi("mezz.jei:jei-${mc_version}-common-api:${jei_version}")
modCompileOnlyApi("mezz.jei:jei-${mc_version}-fabric-api:${jei_version}")
// at runtime, use the full JEI jar for Fabric
modRuntimeOnly("mezz.jei:jei-${mc_version}-fabric:${jei_version}")
}

// compile against the JEI API but do not include it at runtime
modCompileOnlyApi("mezz.jei:jei-${mc_version}-common-api:${jei_version}")
modCompileOnlyApi("mezz.jei:jei-${mc_version}-fabric-api:${jei_version}")
// at runtime, use the full JEI jar for Fabric
modRuntimeOnly("mezz.jei:jei-${mc_version}-fabric:${jei_version}")
remapJar {
addNestedDependencies = true
}

processResources {
inputs.property "version", project.version
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": project.version
}
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 17
it.options.release = 17
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = 17
}
kotlinOptions {
jvmTarget = 17
}
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
}
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}" }
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ loader_version=0.15.7
fabric_kotlin_version=1.10.18+kotlin.1.9.22

# Mod Properties
mod_version=2.0.0
mod_version=2.0.3
build_state=beta
maven_group=xyz.koiro.watersource
archives_base_name=watersource
Expand Down
24 changes: 24 additions & 0 deletions src/main/generated/assets/watersource/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"block.watersource.iron_filter": "Iron Filter",
"block.watersource.purified_water": "Purified Water",
"block.watersource.wooden_filter": "Wooden Filter",
"effect.watersource.thirsty": "Thirsty",
"enchantment.watersource.moisturizing": "Moisturizing",
"item.watersource.compressed_strainer": "Compressed Strainer",
"item.watersource.leather_water_bag_large": "Leather Water Bag (Large)",
"item.watersource.leather_water_bag_medium": "Leather Water Bag (Medium)",
"item.watersource.leather_water_bag_small": "Leather Water Bag (Small)",
"item.watersource.natural_strainer": "Natural Strainer",
"item.watersource.paper_strainer": "Paper Strainer",
"item.watersource.pottery_cup": "Pottery Cup",
"item.watersource.pottery_cup_empty": "Pottery Cup",
"item.watersource.purified_water_bottle": "Purified Water Bottle",
"item.watersource.purified_water_bucket": "Purified Water Bucket",
"item.watersource.raw_pottery_cup": "Raw Pottery Cup",
"item.watersource.waste_strainer": "Waste Strainer",
"item.watersource.wooden_cup": "Wooden Cup",
"item.watersource.wooden_cup_empty": "Wooden Cup",
"watersource.command.error.restore_all_target_must_be_player": "<restoreAll> command's target must be player!",
"watersource.info.capacity": "Capacity",
"watersource.item_group.main": "Water Source"
}
24 changes: 24 additions & 0 deletions src/main/generated/assets/watersource/lang/zh_cn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"block.watersource.iron_filter": "铁质滤水器",
"block.watersource.purified_water": "净化水",
"block.watersource.wooden_filter": "木质滤水器",
"effect.watersource.thirsty": "口渴",
"enchantment.watersource.moisturizing": "保湿",
"item.watersource.compressed_strainer": "压缩滤网",
"item.watersource.leather_water_bag_large": "皮水袋(大)",
"item.watersource.leather_water_bag_medium": "皮水袋(中)",
"item.watersource.leather_water_bag_small": "皮水袋(小)",
"item.watersource.natural_strainer": "自然滤网",
"item.watersource.paper_strainer": "纸滤网",
"item.watersource.pottery_cup": "陶杯子",
"item.watersource.pottery_cup_empty": "陶杯子",
"item.watersource.purified_water_bottle": "净水瓶",
"item.watersource.purified_water_bucket": "净水桶",
"item.watersource.raw_pottery_cup": "陶杯子(未烤制)",
"item.watersource.waste_strainer": "旧滤网",
"item.watersource.wooden_cup": "木杯子",
"item.watersource.wooden_cup_empty": "木杯子",
"watersource.command.error.restore_all_target_must_be_player": "<restoreAll> 命令的目标只能是玩家",
"watersource.info.capacity": "容量",
"watersource.item_group.main": "水源"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/compressed_strainer"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/leather_water_bag_large"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/leather_water_bag_medium"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/leather_water_bag_small"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/natural_strainer"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/paper_strainer"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/pottery_cup_empty"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/purified_water_bottle"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/purified_water_bucket"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/raw_pottery_cup"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/waste_strainer"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "watersource:item/wooden_cup_empty"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"level":0,"saturation":0,"dry_level":1,"match_mode":"all","item":"minecraft:cookie","effects":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"level":1,"saturation":4,"match_mode":"all","item":"minecraft:apple","effects":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"level":1,"saturation":2,"match_mode":"all","item":"minecraft:beetroot_soup","effects":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"level":4,"saturation":20,"match_mode":"all","item":"minecraft:enchanted_golden_apple","effects":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"level":1,"saturation":3,"match_mode":"all","item":"minecraft:glistering_melon_slice","effects":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"level":1,"saturation":3,"match_mode":"all","item":"minecraft:glow_berries","effects":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"level":2,"saturation":8,"match_mode":"all","item":"minecraft:golden_apple","effects":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"level":1,"saturation":3,"match_mode":"all","item":"minecraft:melon_slice","effects":[]}
Loading

0 comments on commit 0543ae7

Please sign in to comment.