Skip to content

Commit

Permalink
Refined scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiiragi283 committed Mar 11, 2024
1 parent 9cc7839 commit 8ebd807
Show file tree
Hide file tree
Showing 77 changed files with 1,483 additions and 81 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ run

# Files from Forge MDK
forge*changelog.txt
.cache
23 changes: 22 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ group = libs.versions.mod.group.get()
version = libs.versions.mod.version.get()
base.archivesName = libs.versions.mod.name.get()


sourceSets {
main {
resources {
srcDir("src/main/generated")
}
}
}

println(
"Java: ${System.getProperty("java.version")}, " +
"JVM: ${System.getProperty("java.vm.version")} (${System.getProperty("java.vendor")}), " +
Expand Down Expand Up @@ -40,6 +49,17 @@ minecraft {
create("server") {
args("--nogui")
}

create("data") {
property("fml.earlyprogresswindow", "false")
workingDirectory(project.file("build/datagen"))
args(
"--mod", libs.versions.mod.id.get(),
"--all",
"--existing", "${file("src/main/resources")}",
"--output", "${file("src/main/generated")}"
)
}
}
}

Expand Down Expand Up @@ -75,13 +95,14 @@ tasks {
put("project", project)
})
}
exclude(".cache")
}

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

exclude("**/datagen/**")
manifest {
attributes(
hashMapOf(
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mod-description = "Add new Smithing Recipe format applying enchantment"
mod-group = "io.github.hiiragi283.enchsmith"
mod-id = "enchanting_smith"
mod-license = "MPL-2.0"
mod-name = "Enchanting Smith"
mod-name = "Enchanting-Smith"
mod-version = "1.0.0+forge1.16.5"

[libraries]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"enchanting_smith:smithing/aqua_affinity"
]
},
"criteria": {
"has_upgrade": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:heart_of_the_sea"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "enchanting_smith:smithing/aqua_affinity"
}
}
},
"requirements": [
[
"has_upgrade",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"enchanting_smith:smithing/bane_of_arthropods"
]
},
"criteria": {
"has_upgrade": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:pufferfish"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "enchanting_smith:smithing/bane_of_arthropods"
}
}
},
"requirements": [
[
"has_upgrade",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"enchanting_smith:smithing/blast_falling"
]
},
"criteria": {
"has_upgrade": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:obsidian"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "enchanting_smith:smithing/blast_falling"
}
}
},
"requirements": [
[
"has_upgrade",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"enchanting_smith:smithing/channeling"
]
},
"criteria": {
"has_upgrade": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:blaze_rod"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "enchanting_smith:smithing/channeling"
}
}
},
"requirements": [
[
"has_upgrade",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"enchanting_smith:smithing/depth_strider"
]
},
"criteria": {
"has_upgrade": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:nautilus_shell"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "enchanting_smith:smithing/depth_strider"
}
}
},
"requirements": [
[
"has_upgrade",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"enchanting_smith:smithing/efficiency"
]
},
"criteria": {
"has_upgrade": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:redstone_block"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "enchanting_smith:smithing/efficiency"
}
}
},
"requirements": [
[
"has_upgrade",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"enchanting_smith:smithing/feather_falling"
]
},
"criteria": {
"has_upgrade": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:feather"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "enchanting_smith:smithing/feather_falling"
}
}
},
"requirements": [
[
"has_upgrade",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"enchanting_smith:smithing/fire_aspect"
]
},
"criteria": {
"has_upgrade": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:flint_and_steel"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "enchanting_smith:smithing/fire_aspect"
}
}
},
"requirements": [
[
"has_upgrade",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"enchanting_smith:smithing/fire_protection"
]
},
"criteria": {
"has_upgrade": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "minecraft:nether_bricks"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "enchanting_smith:smithing/fire_protection"
}
}
},
"requirements": [
[
"has_upgrade",
"has_the_recipe"
]
]
}
Loading

0 comments on commit 8ebd807

Please sign in to comment.