diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0691b1..4bc0bd7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ # against bad commits. name: build -on: [pull_request, push] +on: [pull_request, push, workflow_dispatch] jobs: build: @@ -19,11 +19,11 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/wrapper-validation-action@v2 - name: setup jdk ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -34,7 +34,7 @@ jobs: run: ./gradlew build - name: capture build artifacts if: ${{ runner.os == 'Linux' && matrix.java == '17' }} # Only upload artifacts built from latest java on one OS - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/ diff --git a/LICENSE b/LICENSE index 518edf8..a1e819c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 XenFork Union +Copyright (c) 2023-2024 XenFork Union Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 768b5c2..819edb8 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # SquidCraft -![SquidCraft Downloads on CurseForge](https://cf.way2muchnoise.eu/full_squidcraft_downloads.svg) -![Available Versions](https://cf.way2muchnoise.eu/versions/squidcraft.svg) -![Title](https://cf.way2muchnoise.eu/title/squidcraft.svg) +![SquidCraft Downloads on CurseForge](https://img.shields.io/curseforge/dt/381843) [![build](https://github.com/XenFork/SquidCraft/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/XenFork/SquidCraft/actions/workflows/build.yml) ![discord](https://img.shields.io/discord/699898538112450651) @@ -13,6 +11,6 @@ Make squids useful. ## Additional Links -- [Discord](https://discord.gg/yDrFqRU) - [CurseForge](https://www.curseforge.com/minecraft/mc-mods/squidcraft) - [Modrinth](https://modrinth.com/mod/squidcraft) +- [Discord](https://discord.gg/yDrFqRU) diff --git a/build.gradle b/build.gradle index 78e1cb2..2076cdf 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false + id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false } architectury { @@ -19,7 +19,7 @@ subprojects { // The following line declares the mojmap mappings, you may use other mappings as well mappings loom.officialMojangMappings() // The following line declares the yarn mappings you may select this one as well. - // mappings "net.fabricmc:yarn:@YARN_MAPPINGS@:v2" + // mappings "net.fabricmc:yarn:1.20.1+build.10:v2" } } @@ -28,8 +28,11 @@ allprojects { apply plugin: "architectury-plugin" apply plugin: "maven-publish" - archivesBaseName = rootProject.archives_base_name - version = "${rootProject.mod_version}-${rootProject.minecraft_version}" + base { + archivesName = rootProject.archives_base_name + } + + version = rootProject.mod_version group = rootProject.maven_group repositories { diff --git a/common/build.gradle b/common/build.gradle index 05f5ef2..095e999 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,3 +1,11 @@ +architectury { + common(rootProject.enabled_platforms.split(",")) +} + +loom { + accessWidenerPath = file("src/main/resources/squidcraft.accesswidener") +} + dependencies { // We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies // Do NOT use other classes from fabric loader @@ -6,10 +14,6 @@ dependencies { modApi "dev.architectury:architectury:${rootProject.architectury_version}" } -architectury { - common("fabric", "forge") -} - publishing { publications { mavenCommon(MavenPublication) { diff --git a/common/src/main/java/io/github/xenfork/squidcraft/SquidCraft.java b/common/src/main/java/io/github/xenfork/squidcraft/SquidCraft.java index 06ddd77..a032389 100644 --- a/common/src/main/java/io/github/xenfork/squidcraft/SquidCraft.java +++ b/common/src/main/java/io/github/xenfork/squidcraft/SquidCraft.java @@ -22,6 +22,7 @@ import net.minecraft.advancements.critereon.EntityFlagsPredicate; import net.minecraft.advancements.critereon.EntityPredicate; import net.minecraft.world.entity.EntityType; +import net.minecraft.world.item.Item; import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.entries.LootItem; @@ -43,24 +44,32 @@ public static void init() { ModItems.init(); ModItemGroups.init(); LootEvent.MODIFY_LOOT_TABLE.register((lootDataManager, id, context, builtin) -> { - if (builtin && EntityType.SQUID.getDefaultLootTable().equals(id)) { - context.addPool(LootPool.lootPool() - .setRolls(ConstantValue.exactly(1f)) - .add(LootItem.lootTableItem(ModItems.SHREDDED_SQUID.get()) - .apply(SetItemCountFunction.setCount(UniformGenerator.between(1f, 8f))) - .apply(SmeltItemFunction.smelted().when(() -> - LootItemEntityPropertyCondition.hasProperties( - LootContext.EntityTarget.THIS, - EntityPredicate.Builder.entity() - .flags(EntityFlagsPredicate.Builder.flags() - .setOnFire(true) - .build()) - ).build()) - ) - .apply(LootingEnchantFunction.lootingMultiplier(UniformGenerator.between(1f, 4f)).setLimit(8)) - ) - ); + if (builtin) { + if (EntityType.SQUID.getDefaultLootTable().equals(id)) { + addLootItem(context, ModItems.SHREDDED_SQUID.get()); + } else if (EntityType.GLOW_SQUID.getDefaultLootTable().equals(id)) { + addLootItem(context, ModItems.GLOWING_SHREDDED_SQUID.get()); + } } }); } + + private static void addLootItem(LootEvent.LootTableModificationContext context, Item item) { + context.addPool(LootPool.lootPool() + .setRolls(ConstantValue.exactly(1f)) + .add(LootItem.lootTableItem(item) + .apply(SetItemCountFunction.setCount(UniformGenerator.between(1f, 8f))) + .apply(SmeltItemFunction.smelted().when(() -> + LootItemEntityPropertyCondition.hasProperties( + LootContext.EntityTarget.THIS, + EntityPredicate.Builder.entity() + .flags(EntityFlagsPredicate.Builder.flags() + .setOnFire(true) + .build()) + ).build()) + ) + .apply(LootingEnchantFunction.lootingMultiplier(UniformGenerator.between(1f, 4f))) + ) + ); + } } diff --git a/common/src/main/java/io/github/xenfork/squidcraft/item/ModItemGroups.java b/common/src/main/java/io/github/xenfork/squidcraft/item/ModItemGroups.java index 9435739..da5fe1e 100644 --- a/common/src/main/java/io/github/xenfork/squidcraft/item/ModItemGroups.java +++ b/common/src/main/java/io/github/xenfork/squidcraft/item/ModItemGroups.java @@ -38,8 +38,11 @@ public final class ModItemGroups { .icon(() -> new ItemStack(ModItems.SHREDDED_SQUID.get())) .displayItems((itemDisplayParameters, output) -> { output.accept(Items.SQUID_SPAWN_EGG); + output.accept(Items.GLOW_SQUID_SPAWN_EGG); output.accept(ModItems.SHREDDED_SQUID.get()); output.accept(ModItems.COOKED_SHREDDED_SQUID.get()); + output.accept(ModItems.GLOWING_SHREDDED_SQUID.get()); + output.accept(ModItems.MAGMA_SHREDDED_SQUID.get()); }) )); diff --git a/common/src/main/java/io/github/xenfork/squidcraft/item/ModItems.java b/common/src/main/java/io/github/xenfork/squidcraft/item/ModItems.java index f799827..02a06e7 100644 --- a/common/src/main/java/io/github/xenfork/squidcraft/item/ModItems.java +++ b/common/src/main/java/io/github/xenfork/squidcraft/item/ModItems.java @@ -20,10 +20,13 @@ import dev.architectury.registry.registries.RegistrySupplier; import io.github.xenfork.squidcraft.SquidCraft; import net.minecraft.core.registries.Registries; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; import net.minecraft.world.food.FoodProperties; import net.minecraft.world.item.Item; import java.util.Locale; +import java.util.function.Consumer; import java.util.function.Supplier; /** @@ -32,7 +35,9 @@ */ public enum ModItems { SHREDDED_SQUID(() -> ofSnack(1, 1f)), - COOKED_SHREDDED_SQUID(() -> ofSnack(2, 1f)); + COOKED_SHREDDED_SQUID(() -> ofSnack(2, 1f)), + GLOWING_SHREDDED_SQUID(() -> ofMeat(1, 1f, builder -> builder.effect(new MobEffectInstance(MobEffects.GLOWING, 200, 0), 1f))), + MAGMA_SHREDDED_SQUID(() -> ofMeat(2, 0.5f, builder -> builder.effect(new MobEffectInstance(MobEffects.FIRE_RESISTANCE, 200, 0), 0.3f))); private static final DeferredRegister REGISTER = DeferredRegister.create(SquidCraft.MOD_ID, Registries.ITEM); private final String path; @@ -56,13 +61,17 @@ public static void init() { REGISTER.register(); } - private static Item ofSnack(int nutrition, float saturationMod) { - return new Item(new Item.Properties().food(new FoodProperties.Builder() + private static Item ofMeat(int nutrition, float saturationMod, Consumer consumer) { + final FoodProperties.Builder builder = new FoodProperties.Builder() .nutrition(nutrition) .saturationMod(saturationMod) - .fast() - .meat() - .build())); + .meat(); + consumer.accept(builder); + return new Item(new Item.Properties().food(builder.build())); + } + + private static Item ofSnack(int nutrition, float saturationMod) { + return ofMeat(nutrition, saturationMod, FoodProperties.Builder::fast); } public String path() { diff --git a/common/src/main/resources/assets/squidcraft/lang/en_us.json b/common/src/main/resources/assets/squidcraft/lang/en_us.json index 79aaa43..c2d860e 100644 --- a/common/src/main/resources/assets/squidcraft/lang/en_us.json +++ b/common/src/main/resources/assets/squidcraft/lang/en_us.json @@ -1,9 +1,15 @@ { "advancements.squidcraft.root.title": "SquidCraft", - "advancements.squidcraft.root.description": "A beginning of the squids", + "advancements.squidcraft.root.description": "Get shredded squid", "advancements.squidcraft.cooked_shredded_squid.title": "Cooked Shredded Squid", - "advancements.squidcraft.cooked_shredded_squid.description": "Snacks", + "advancements.squidcraft.cooked_shredded_squid.description": "Get cooked shredded squid", + "advancements.squidcraft.glowing_shredded_squid.title": "Glowing Shredded Squid", + "advancements.squidcraft.glowing_shredded_squid.description": "Get glowing shredded squid", + "advancements.squidcraft.magma_shredded_squid.title": "Magma Shredded Squid", + "advancements.squidcraft.magma_shredded_squid.description": "Get magma shredded squid", "item.squidcraft.shredded_squid": "Shredded Squid", "item.squidcraft.cooked_shredded_squid": "Cooked Shredded Squid", + "item.squidcraft.glowing_shredded_squid": "Glowing Shredded Squid", + "item.squidcraft.magma_shredded_squid": "Magma Shredded Squid", "itemGroup.squidcraft.main": "SquidCraft" } diff --git a/common/src/main/resources/assets/squidcraft/lang/zh_cn.json b/common/src/main/resources/assets/squidcraft/lang/zh_cn.json index b90dc64..513204a 100644 --- a/common/src/main/resources/assets/squidcraft/lang/zh_cn.json +++ b/common/src/main/resources/assets/squidcraft/lang/zh_cn.json @@ -1,9 +1,15 @@ { "advancements.squidcraft.root.title": "鱿鱼工艺", - "advancements.squidcraft.root.description": "起源", + "advancements.squidcraft.root.description": "获得鱿鱼丝", "advancements.squidcraft.cooked_shredded_squid.title": "熟鱿鱼丝", - "advancements.squidcraft.cooked_shredded_squid.description": "小吃", + "advancements.squidcraft.cooked_shredded_squid.description": "获得熟鱿鱼丝", + "advancements.squidcraft.glowing_shredded_squid.title": "荧光鱿鱼丝", + "advancements.squidcraft.glowing_shredded_squid.description": "获得荧光鱿鱼丝", + "advancements.squidcraft.magma_shredded_squid.title": "岩浆鱿鱼丝", + "advancements.squidcraft.magma_shredded_squid.description": "获得岩浆鱿鱼丝", "item.squidcraft.shredded_squid": "鱿鱼丝", "item.squidcraft.cooked_shredded_squid": "熟鱿鱼丝", + "item.squidcraft.glowing_shredded_squid": "荧光鱿鱼丝", + "item.squidcraft.magma_shredded_squid": "岩浆鱿鱼丝", "itemGroup.squidcraft.main": "鱿鱼工艺" } diff --git a/common/src/main/resources/assets/squidcraft/models/item/glowing_shredded_squid.json b/common/src/main/resources/assets/squidcraft/models/item/glowing_shredded_squid.json new file mode 100644 index 0000000..289c807 --- /dev/null +++ b/common/src/main/resources/assets/squidcraft/models/item/glowing_shredded_squid.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "squidcraft:item/glowing_shredded_squid" + } +} diff --git a/common/src/main/resources/assets/squidcraft/models/item/magma_shredded_squid.json b/common/src/main/resources/assets/squidcraft/models/item/magma_shredded_squid.json new file mode 100644 index 0000000..35e6fde --- /dev/null +++ b/common/src/main/resources/assets/squidcraft/models/item/magma_shredded_squid.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "squidcraft:item/magma_shredded_squid" + } +} diff --git a/common/src/main/resources/data/c/raw_fishes.json b/common/src/main/resources/data/c/raw_fishes.json new file mode 100644 index 0000000..c853bed --- /dev/null +++ b/common/src/main/resources/data/c/raw_fishes.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "squidcraft:shredded_squid", + "squidcraft:glowing_shredded_squid.json" + ] +} diff --git a/common/src/main/resources/data/forge/raw_fishes.json b/common/src/main/resources/data/forge/raw_fishes.json new file mode 100644 index 0000000..c853bed --- /dev/null +++ b/common/src/main/resources/data/forge/raw_fishes.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "squidcraft:shredded_squid", + "squidcraft:glowing_shredded_squid.json" + ] +} diff --git a/common/src/main/resources/data/squidcraft/advancements/glowing_shredded_squid.json b/common/src/main/resources/data/squidcraft/advancements/glowing_shredded_squid.json new file mode 100644 index 0000000..c1c2e96 --- /dev/null +++ b/common/src/main/resources/data/squidcraft/advancements/glowing_shredded_squid.json @@ -0,0 +1,29 @@ +{ + "parent": "squidcraft:root", + "criteria": { + "glowing_shredded_squid": { + "conditions": { + "items": [ + { + "items": [ + "squidcraft:glowing_shredded_squid" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": false, + "description": { + "translate": "advancements.squidcraft.glowing_shredded_squid.description" + }, + "title": { + "translate": "advancements.squidcraft.glowing_shredded_squid.title" + }, + "icon": { + "item": "squidcraft:glowing_shredded_squid" + } + } +} diff --git a/common/src/main/resources/data/squidcraft/advancements/magma_shredded_squid.json b/common/src/main/resources/data/squidcraft/advancements/magma_shredded_squid.json new file mode 100644 index 0000000..b60c414 --- /dev/null +++ b/common/src/main/resources/data/squidcraft/advancements/magma_shredded_squid.json @@ -0,0 +1,29 @@ +{ + "parent": "squidcraft:root", + "criteria": { + "magma_shredded_squid": { + "conditions": { + "items": [ + { + "items": [ + "squidcraft:magma_shredded_squid" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": false, + "description": { + "translate": "advancements.squidcraft.magma_shredded_squid.description" + }, + "title": { + "translate": "advancements.squidcraft.magma_shredded_squid.title" + }, + "icon": { + "item": "squidcraft:magma_shredded_squid" + } + } +} diff --git a/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid.json b/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid.json index fcefa10..2ad6d1d 100644 --- a/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid.json +++ b/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid.json @@ -13,6 +13,18 @@ }, "trigger": "minecraft:inventory_changed" }, + "has_glowing_shredded_squid": { + "conditions": { + "items": [ + { + "items": [ + "squidcraft:glowing_shredded_squid" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, "has_the_recipe": { "conditions": { "recipe": "squidcraft:cooked_shredded_squid" @@ -23,6 +35,7 @@ "requirements": [ [ "has_shredded_squid", + "has_glowing_shredded_squid", "has_the_recipe" ] ], diff --git a/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid_from_campfire_cooking.json b/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid_from_campfire_cooking.json index c7b4afd..98dfec9 100644 --- a/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid_from_campfire_cooking.json +++ b/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid_from_campfire_cooking.json @@ -13,6 +13,18 @@ }, "trigger": "minecraft:inventory_changed" }, + "has_glowing_shredded_squid": { + "conditions": { + "items": [ + { + "items": [ + "squidcraft:glowing_shredded_squid" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, "has_the_recipe": { "conditions": { "recipe": "squidcraft:cooked_shredded_squid" @@ -23,6 +35,7 @@ "requirements": [ [ "has_shredded_squid", + "has_glowing_shredded_squid", "has_the_recipe" ] ], diff --git a/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid_from_smoking.json b/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid_from_smoking.json index 39f3698..8b04dda 100644 --- a/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid_from_smoking.json +++ b/common/src/main/resources/data/squidcraft/advancements/recipes/cooked_shredded_squid_from_smoking.json @@ -13,6 +13,18 @@ }, "trigger": "minecraft:inventory_changed" }, + "has_glowing_shredded_squid": { + "conditions": { + "items": [ + { + "items": [ + "squidcraft:glowing_shredded_squid" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, "has_the_recipe": { "conditions": { "recipe": "squidcraft:cooked_shredded_squid" @@ -23,6 +35,7 @@ "requirements": [ [ "has_shredded_squid", + "has_glowing_shredded_squid", "has_the_recipe" ] ], diff --git a/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid.json b/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid.json index 1539122..57195ad 100644 --- a/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid.json +++ b/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid.json @@ -1,8 +1,13 @@ { "type": "minecraft:smelting", - "ingredient": { - "item": "squidcraft:shredded_squid" - }, + "ingredient": [ + { + "item": "squidcraft:shredded_squid" + }, + { + "item": "squidcraft:glowing_shredded_squid" + } + ], "result": "squidcraft:cooked_shredded_squid", "experience": 0.35, "cookingtime": 100 diff --git a/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid_from_campfire_cooking.json b/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid_from_campfire_cooking.json index 439ba7e..71200c3 100644 --- a/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid_from_campfire_cooking.json +++ b/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid_from_campfire_cooking.json @@ -1,8 +1,13 @@ { "type": "minecraft:campfire_cooking", - "ingredient": { - "item": "squidcraft:shredded_squid" - }, + "ingredient": [ + { + "item": "squidcraft:shredded_squid" + }, + { + "item": "squidcraft:glowing_shredded_squid" + } + ], "result": "squidcraft:cooked_shredded_squid", "experience": 0.35, "cookingtime": 100 diff --git a/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid_from_smoking.json b/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid_from_smoking.json index 7a20f38..8a96326 100644 --- a/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid_from_smoking.json +++ b/common/src/main/resources/data/squidcraft/recipes/cooked_shredded_squid_from_smoking.json @@ -1,8 +1,13 @@ { "type": "minecraft:smoking", - "ingredient": { - "item": "squidcraft:shredded_squid" - }, + "ingredient": [ + { + "item": "squidcraft:shredded_squid" + }, + { + "item": "squidcraft:glowing_shredded_squid" + } + ], "result": "squidcraft:cooked_shredded_squid", "experience": 0.35, "cookingtime": 50 diff --git a/common/src/main/resources/data/squidcraft/recipes/magma_shredded_squid.json b/common/src/main/resources/data/squidcraft/recipes/magma_shredded_squid.json new file mode 100644 index 0000000..2e15648 --- /dev/null +++ b/common/src/main/resources/data/squidcraft/recipes/magma_shredded_squid.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + [ + { + "item": "squidcraft:shredded_squid" + }, + { + "item": "squidcraft:glowing_shredded_squid" + } + ], + [ + { + "item": "squidcraft:shredded_squid" + }, + { + "item": "squidcraft:glowing_shredded_squid" + } + ], + { + "item": "minecraft:magma_cream" + } + ], + "result": { + "count": 1, + "item": "squidcraft:magma_shredded_squid" + } +} diff --git a/common/src/main/resources/squidcraft.accesswidener b/common/src/main/resources/squidcraft.accesswidener new file mode 100644 index 0000000..13268c3 --- /dev/null +++ b/common/src/main/resources/squidcraft.accesswidener @@ -0,0 +1 @@ +accessWidener v2 named \ No newline at end of file diff --git a/fabric/build.gradle b/fabric/build.gradle index 7306356..1e8b71b 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -34,8 +34,10 @@ processResources { } shadowJar { + exclude "architectury.common.json" + configurations = [project.configurations.shadowCommon] - archiveClassifier.set("dev-shadow") + archiveClassifier = "dev-shadow" } remapJar { @@ -72,4 +74,4 @@ publishing { repositories { // Add repositories to publish to here. } -} \ No newline at end of file +} diff --git a/forge/build.gradle b/forge/build.gradle index 27a868e..8a28e95 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -1,11 +1,21 @@ plugins { id "com.github.johnrengelman.shadow" version "7.1.2" } + architectury { platformSetupLoomIde() forge() } +loom { + accessWidenerPath = project(":common").loom.accessWidenerPath + + forge { + convertAccessWideners = true + extraAccessWideners.add loom.accessWidenerPath.get().asFile.name + } +} + configurations { common shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. @@ -33,6 +43,7 @@ processResources { shadowJar { exclude "fabric.mod.json" + exclude "architectury.common.json" configurations = [project.configurations.shadowCommon] archiveClassifier.set("dev-shadow") @@ -41,11 +52,6 @@ shadowJar { remapJar { inputFile.set shadowJar.archiveFile dependsOn shadowJar - archiveClassifier.set(null) -} - -jar { - archiveClassifier.set("dev") } sourcesJar { diff --git a/gradle.properties b/gradle.properties index 802d12c..3f1d2fd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,15 @@ org.gradle.jvmargs=-Xmx1G minecraft_version=1.20.1 +enabled_platforms=fabric,forge archives_base_name=squidcraft -mod_version=0.14.0-alpha.0 +mod_version=0.14.0-alpha.1 maven_group=io.github.xenfork -architectury_version=9.1.12 +architectury_version=9.2.14 -fabric_loader_version=0.14.22 -fabric_api_version=0.87.0+1.20.1 +fabric_loader_version=0.15.7 +fabric_api_version=0.92.0+1.20.1 -forge_version=1.20.1-47.1.44 +forge_version=1.20.1-47.2.21 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5083229..509c4a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index 06a89e4..59ee637 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,4 +9,6 @@ pluginManagement { include("common") include("fabric") -include("forge") \ No newline at end of file +include("forge") + +rootProject.name = "squidcraft"