diff --git a/build.gradle b/build.gradle index 937531e..32c4479 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,13 @@ plugins { - id 'fabric-loom' version '1.10.1' - id 'maven-publish' + id 'net.fabricmc.fabric-loom-remap' version "${loom_version}" + id 'maven-publish' } -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 - -archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group repositories { - mavenLocal() + mavenLocal() maven { name "cloth config" url "https://maven.shedaniel.me" @@ -44,11 +40,21 @@ repositories { name = "TeamResourceful" url = "https://maven.teamresourceful.com/repository/maven-releases" } - } +// loom { +// splitEnvironmentSourceSets() + +// mods { +// "modid" { +// sourceSet sourceSets.main +// sourceSet sourceSets.client +// } +// } +// } + dependencies { - minecraft "com.mojang:minecraft:${project.minecraft_version}" + minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings loom.layered { // officialMojangMappings() mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" @@ -71,54 +77,54 @@ dependencies { modLocalRuntime "dev.emi:emi-fabric:${emi_version}" modImplementation "dev.cammiescorner.icarus:Icarus-Fabric:${project.icarus_version}" + } processResources { - inputs.property "version", project.version + def version = project.version + inputs.property "version", version - filteringCharset = "UTF-8" - - filesMatching("fabric.mod.json") { - expand "version": project.version - } + filesMatching("fabric.mod.json") { + expand "version": version + } } -// ensure that the encoding is set to UTF-8, no matter what the system default is -// this fixes some edge cases with special characters not displaying correctly -// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html -tasks.withType(JavaCompile) { - options.encoding = "UTF-8" +tasks.withType(JavaCompile).configureEach { + it.options.release = 17 } -// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task -// if it is present. -// If you remove this task, sources will not be generated. -// task sourcesJar(type: Jar, dependsOn: classes) { -// classifier = "sources" -// from sourceSets.main.allSource -// } +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() + + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} jar { - from "LICENSE" + def projectName = project.name + inputs.property "projectName", projectName + + from("LICENSE") { + rename { "${it}_$projectName"} + } } // configure the maven publication publishing { - publications { - mavenJava(MavenPublication) { - // add all the jars that should be included when publishing to maven - artifact(remapJar) { - builtBy remapJar - } - // artifact(sourcesJar) { - // builtBy remapSourcesJar - // } - } - } + publications { + create("mavenJava", MavenPublication) { + from components.java + } + } - // select the repositories you want to publish to - repositories { - // uncomment to publish to the local maven - // mavenLocal() - } + // 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. + } } diff --git a/build.gradle.old b/build.gradle.old new file mode 100644 index 0000000..bc866b7 --- /dev/null +++ b/build.gradle.old @@ -0,0 +1,124 @@ +plugins { + id 'fabric-loom' version '1.17-SNAPSHOT' + id 'maven-publish' +} + +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 + +archivesBaseName = project.archives_base_name +version = project.mod_version +group = project.maven_group + +repositories { + mavenLocal() + maven { + name "cloth config" + url "https://maven.shedaniel.me" + } + maven { + name "mod menu" + url "https://maven.terraformersmc.com" + } + maven { + name "playerabilitylib" + url "https://maven.ladysnake.org/releases" + } + maven { + name "reach entity attributes" + url "https://maven.jamieswhiteshirt.com/libs-release" + } + maven { + name "jitpack" + url "https://jitpack.io" + } + maven { + name = "Up-Mods" + url = "https://maven.uuid.gg/releases" + } + maven { + name = "JourneyMap" + url = "https://jm.gserv.me/repository/maven-public" + } + maven { + name = "TeamResourceful" + url = "https://maven.teamresourceful.com/repository/maven-releases" + } + +} + +dependencies { + minecraft "com.mojang:minecraft:${project.minecraft_version}" + mappings loom.layered { + // officialMojangMappings() + mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" + // parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_mappings}@zip") + } + + modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + + modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" + + modImplementation "com.github.apace100:origins-fabric:${project.origins_version}" + modImplementation "com.github.apace100:apoli:${project.apoli_version}" + modImplementation "com.github.apace100:calio:${project.calio_version}" + modApi("com.github.Virtuoel:Pehkui:${pehkui_version}", { + exclude group: "net.fabricmc.fabric-api" + }) + + modCompileOnly "dev.emi:emi-fabric:${emi_version}:api" + modLocalRuntime "dev.emi:emi-fabric:${emi_version}" + + modImplementation "dev.cammiescorner.icarus:Icarus-Fabric:${project.icarus_version}" +} + +processResources { + inputs.property "version", project.version + + filteringCharset = "UTF-8" + + filesMatching("fabric.mod.json") { + expand "version": project.version + } +} + +// ensure that the encoding is set to UTF-8, no matter what the system default is +// this fixes some edge cases with special characters not displaying correctly +// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html +tasks.withType(JavaCompile) { + options.encoding = "UTF-8" +} + +// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task +// if it is present. +// If you remove this task, sources will not be generated. +// task sourcesJar(type: Jar, dependsOn: classes) { +// classifier = "sources" +// from sourceSets.main.allSource +// } + +jar { + from "LICENSE" +} + +// configure the maven publication +publishing { + publications { + mavenJava(MavenPublication) { + // add all the jars that should be included when publishing to maven + artifact(remapJar) { + builtBy remapJar + } + // artifact(sourcesJar) { + // builtBy remapSourcesJar + // } + } + } + + // select the repositories you want to publish to + repositories { + // uncomment to publish to the local maven + // mavenLocal() + } +} diff --git a/gradle.properties b/gradle.properties index 1b8aa71..c8bcde3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,8 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties minecraft_version=1.20.1 yarn_mappings=1.20.1+build.10 -loader_version=0.16.10 +loader_version=0.19.3 +loom_version=1.17-SNAPSHOT # Mod Properties mod_version=1.20.1-0.0.1 @@ -17,7 +18,7 @@ modmenu_version=7.2.2 pehkui_version=3.7.8 origins_version=v1.10.0 apoli_version=2.9.0 -icarus_version=2.11.0 +icarus_version=2.14.0 emi_version=1.1.22+1.20.1 calio_version=v1.11.0 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d6e308a..efb903f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/resources/assets/faithful/lang/en_us.json b/src/main/resources/assets/faithful/lang/en_us.json index c0b8651..18e738c 100644 --- a/src/main/resources/assets/faithful/lang/en_us.json +++ b/src/main/resources/assets/faithful/lang/en_us.json @@ -19,5 +19,25 @@ "power.faithful.dwarf-powers/dwarven_resistance.name": "Dwarven Resistance", "power.faithful.dwarf-powers/dwarven_resistance.description": "Dwarves have thicker skin that acts as armour.", "power.faithful.dwarf-powers/dwarven_mining.name": "Exceptional Miner", - "power.faithful.dwarf-powers/dwarven_mining.description": "Dwarves are known to be the greatest miners in the world, they are able to get valuable ores from bland stones." + "power.faithful.dwarf-powers/dwarven_mining.description": "Dwarves are known to be the greatest miners in the world, they are able to get valuable ores from bland stones.", + + //-----pixie-----// + "origin.faithful.pixie.name": "Pixie", + "origin.faithful.pixie.description": "Tiny, mischievous creatures that live in forests.", + "power.faithful.pixie-powers/wings.name": "Flight", + "power.faithful.pixie-powers/wings.description": "Pixies have wings that give them powered flight.", + "power.faithful.pixie-powers/tiny.name": "Tiny", + "power.faithful.pixie-powers/tiny.description": "Pixies are half a block tall.", + "power.faithful.pixie-powers/luck.name": "Pixie Luck", + "power.faithful.pixie-powers/luck.description": "Pixies have a little bit of luck on their side.", + + //-----kitsune-----// + "origin.faithful.kitsune.name": "Pixie", + "origin.faithful.kitsune.description": "Tiny, mischievous creatures that live in forests.", + "power.faithful.kitsune-powers/light.name": "Light", + "power.faithful.kitsune-powers/light.description": "Kitsune do not sink in powder snow, and do not alert skulk", + "power.faithful.kitsune-powers/small.name": "Small", + "power.faithful.kitsune-powers/small.description": "Kitsune are small creatures, due to their foxlike origins.", + "power.faithful.kitsune-powers/swift.name": "Swift", + "power.faithful.kitsune-powers/swift.description": "Kitsune are a bit faster than others would consider normal." } \ No newline at end of file diff --git a/src/main/resources/data/faithful/loot_tables/dwarf_mining.json b/src/main/resources/data/faithful/loot_tables/dwarf_mining.json index e6bdf28..04297ce 100644 --- a/src/main/resources/data/faithful/loot_tables/dwarf_mining.json +++ b/src/main/resources/data/faithful/loot_tables/dwarf_mining.json @@ -16,7 +16,7 @@ "conditions": [ { "condition": "minecraft:random_chance", - "chance": 0.1 + "chance": 0.05 } ] }, @@ -28,7 +28,7 @@ "conditions": [ { "condition": "minecraft:random_chance", - "chance": 0.1 + "chance": 0.05 } ] } diff --git a/src/main/resources/data/faithful/origins/dwarf.json b/src/main/resources/data/faithful/origins/dwarf.json index 337f259..e68299b 100644 --- a/src/main/resources/data/faithful/origins/dwarf.json +++ b/src/main/resources/data/faithful/origins/dwarf.json @@ -6,5 +6,5 @@ ], "icon": "minecraft:dirt", "order": 1001, - "impact": 3 + "impact": 1 } diff --git a/src/main/resources/data/faithful/origins/elf.json b/src/main/resources/data/faithful/origins/elf.json index 0d35799..7b50d3a 100644 --- a/src/main/resources/data/faithful/origins/elf.json +++ b/src/main/resources/data/faithful/origins/elf.json @@ -7,5 +7,5 @@ ], "icon": "minecraft:dirt", "order": 1000, - "impact": 3 + "impact": 1 } diff --git a/src/main/resources/data/faithful/origins/kitsune.json b/src/main/resources/data/faithful/origins/kitsune.json new file mode 100644 index 0000000..21912cc --- /dev/null +++ b/src/main/resources/data/faithful/origins/kitsune.json @@ -0,0 +1,10 @@ +{ + "powers": [ + "faithful:kitsune-powers/swift", + "faithful:kitsune-powers/small", + "faithful:kitsune-powers/light" + ], + "icon": "minecraft:dirt", + "order": 1003, + "impact": 1 +} diff --git a/src/main/resources/data/faithful/origins/pixie.json b/src/main/resources/data/faithful/origins/pixie.json new file mode 100644 index 0000000..c9a359f --- /dev/null +++ b/src/main/resources/data/faithful/origins/pixie.json @@ -0,0 +1,11 @@ +{ + "powers": [ + "faithful:pixie-powers/wings", + "faithful:pixie-powers/tiny", + "faithful:pixie-powers/luck", + "faithful:pixie-powers/light" + ], + "icon": "minecraft:dirt", + "order": 1002, + "impact": 1 +} diff --git a/src/main/resources/data/faithful/powers/kitsune-powers/light.json b/src/main/resources/data/faithful/powers/kitsune-powers/light.json new file mode 100644 index 0000000..5fc1a5a --- /dev/null +++ b/src/main/resources/data/faithful/powers/kitsune-powers/light.json @@ -0,0 +1,13 @@ +{ + "type": "origins:multiple", + "no_skulk": { + "type": "origins:prevent_game_event", + "event": "minecraft:step", + "events": [ + "minecraft:hit_ground" + ] + }, + "snow": { + "type": "faithful:can_walk_on_powder_snow" + } +} \ No newline at end of file diff --git a/src/main/resources/data/faithful/powers/kitsune-powers/small.json b/src/main/resources/data/faithful/powers/kitsune-powers/small.json new file mode 100644 index 0000000..e66be35 --- /dev/null +++ b/src/main/resources/data/faithful/powers/kitsune-powers/small.json @@ -0,0 +1,24 @@ +{ + "type": "origins:action_on_callback", + "entity_action_gained": { + "type": "origins:and", + "actions": [ + { + "type": "origins:execute_command", + "command": "scale set pehkui:height .80 @s", + "permission_level": 4 + }, + { + "type": "origins:execute_command", + "command": "scale set pehkui:width .80 @s", + "permission_level": 4 + }, + { + "type": "origins:execute_command", + "command": "scale persist set true", + "permission_level": 4 + } + ] + }, + "when_orb": true +} \ No newline at end of file diff --git a/src/main/resources/data/faithful/powers/kitsune-powers/swift.json b/src/main/resources/data/faithful/powers/kitsune-powers/swift.json new file mode 100644 index 0000000..bd8e9ad --- /dev/null +++ b/src/main/resources/data/faithful/powers/kitsune-powers/swift.json @@ -0,0 +1,9 @@ +{ + "type": "origins:attribute", + "modifier": { + "name": "swift", + "attribute": "minecraft:generic.movement_speed", + "value": 0.05, + "operation": "multiply_base" + } +} \ No newline at end of file diff --git a/src/main/resources/data/faithful/powers/pixie-powers/light.json b/src/main/resources/data/faithful/powers/pixie-powers/light.json new file mode 100644 index 0000000..686a6c2 --- /dev/null +++ b/src/main/resources/data/faithful/powers/pixie-powers/light.json @@ -0,0 +1,4 @@ +{ + "type": "faithful:can_walk_on_powder_snow", + "hidden": true +} \ No newline at end of file diff --git a/src/main/resources/data/faithful/powers/pixie-powers/luck.json b/src/main/resources/data/faithful/powers/pixie-powers/luck.json new file mode 100644 index 0000000..8cf39be --- /dev/null +++ b/src/main/resources/data/faithful/powers/pixie-powers/luck.json @@ -0,0 +1,13 @@ +{ + "type": "origins:attribute", + "modifiers": + [ + { + "name": "lucky", + "attribute": "generic.luck", + "value": 2.0, + "operation": "addition" + } + ] + +} diff --git a/src/main/resources/data/faithful/powers/pixie-powers/tiny.json b/src/main/resources/data/faithful/powers/pixie-powers/tiny.json new file mode 100644 index 0000000..4ef5a40 --- /dev/null +++ b/src/main/resources/data/faithful/powers/pixie-powers/tiny.json @@ -0,0 +1,24 @@ +{ + "type": "origins:action_on_callback", + "entity_action_gained": { + "type": "origins:and", + "actions": [ + { + "type": "origins:execute_command", + "command": "scale set pehkui:height .25 @s", + "permission_level": 4 + }, + { + "type": "origins:execute_command", + "command": "scale set pehkui:width .25 @s", + "permission_level": 4 + }, + { + "type": "origins:execute_command", + "command": "scale persist set true", + "permission_level": 4 + } + ] + }, + "when_orb": true +} \ No newline at end of file diff --git a/src/main/resources/data/faithful/powers/pixie-powers/wings.json b/src/main/resources/data/faithful/powers/pixie-powers/wings.json new file mode 100644 index 0000000..fe063ab --- /dev/null +++ b/src/main/resources/data/faithful/powers/pixie-powers/wings.json @@ -0,0 +1,7 @@ +{ + "type": "faithful:wings", + "wings_type": "icarus:zanzas_wings", + "armor_slows": false, + "exhaustion_amount": 0.1, + "wings_speed": 0.02 +} \ No newline at end of file diff --git a/src/main/resources/data/faithful/powers/wings.json b/src/main/resources/data/faithful/powers/wings.json deleted file mode 100644 index faebb9e..0000000 --- a/src/main/resources/data/faithful/powers/wings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "faithful:wings", - "wings_type": "icarus:white_feathered_wings" -} \ No newline at end of file diff --git a/src/main/resources/data/origins/origin_layers/origin.json b/src/main/resources/data/origins/origin_layers/origin.json index 136f083..5286d0c 100644 --- a/src/main/resources/data/origins/origin_layers/origin.json +++ b/src/main/resources/data/origins/origin_layers/origin.json @@ -3,6 +3,8 @@ "origins": [ "faithful:elf", "faithful:dwarf", + "faithful:pixie", + "faithful:kitsune", { "condition": { "type": "origins:equipped_item",