diff --git a/.github/workflows/build-on-pr.yml b/.github/workflows/build-on-pr.yml index 85ec7ed..45e6a8e 100644 --- a/.github/workflows/build-on-pr.yml +++ b/.github/workflows/build-on-pr.yml @@ -12,11 +12,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 16 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: - distribution: 'adopt' - java-version: 16 + distribution: 'temurin' + java-version: 17 - name: Cache Gradle packages uses: actions/cache@v2 with: diff --git a/.github/workflows/devbuild.yml b/.github/workflows/devbuild.yml index 8482dcb..3e2034c 100644 --- a/.github/workflows/devbuild.yml +++ b/.github/workflows/devbuild.yml @@ -12,11 +12,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 16 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: - distribution: 'adopt' - java-version: 16 + distribution: 'temurin' + java-version: 17 - name: Cache Gradle packages uses: actions/cache@v2 with: diff --git a/build.gradle b/build.gradle index 265a903..df67d07 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.8-SNAPSHOT' + id 'fabric-loom' version '0.10-SNAPSHOT' id 'maven-publish' } @@ -9,16 +9,16 @@ repositories { } } -sourceCompatibility = JavaVersion.VERSION_16 -targetCompatibility = JavaVersion.VERSION_16 +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 archivesBaseName = project.archives_base_name version = project.minecraft_version+'-'+project.mod_version group = project.maven_group minecraft.refmapName = "carpet-autocraftingtable-refmap.json" -minecraft { - accessWidener "src/main/resources/act.accesswidener" +loom { + accessWidener = file("src/main/resources/act.accesswidener") } dependencies { @@ -46,8 +46,7 @@ processResources { tasks.withType(JavaCompile) { options.encoding = "UTF-8" - // Minecraft 1.17 (21w19a) upwards uses Java 16. - it.options.release = 16 + it.options.release = 17 } // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task diff --git a/gradle.properties b/gradle.properties index 91fb87d..852087e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use or https://modmuss50.me/fabric.html - minecraft_version=1.17.1 - yarn_mappings=1.17.1+build.1 + minecraft_version=1.18 + yarn_mappings=1.18+build.1 loader_version=0.11.6 # check available versions on maven for the given minecraft version you are using - carpet_core_version=1.4.43+v210706 + carpet_core_version=1.4.56+v211130 # Mod Properties - mod_version = 1.4.43 + mod_version = 1.4.56 maven_group = carpet-autocraftingtable archives_base_name = carpet-autocraftingtable diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e5338d3..e750102 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-7.0.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/carpet_autocraftingtable/CraftingTableBlockEntity.java b/src/main/java/carpet_autocraftingtable/CraftingTableBlockEntity.java index 5d56885..69db61d 100644 --- a/src/main/java/carpet_autocraftingtable/CraftingTableBlockEntity.java +++ b/src/main/java/carpet_autocraftingtable/CraftingTableBlockEntity.java @@ -55,11 +55,10 @@ public class CraftingTableBlockEntity extends LockableContainerBlockEntity imple public static void init() { } // registers BE type @Override - public NbtCompound writeNbt(NbtCompound tag) { + public void writeNbt(NbtCompound tag) { super.writeNbt(tag); Inventories.writeNbt(tag, inventory); tag.put("Output", output.writeNbt(new NbtCompound())); - return tag; } @Override @@ -210,7 +209,7 @@ private ItemStack craft() { if (!remainingStack.isEmpty()) { if (current.isEmpty()) { inventory.set(i, remainingStack); - } else if (ItemStack.areItemsEqualIgnoreDamage(current, remainingStack) && ItemStack.areTagsEqual(current, remainingStack)) { + } else if (ItemStack.areItemsEqualIgnoreDamage(current, remainingStack) && ItemStack.areEqual(current, remainingStack)) { current.increment(remainingStack.getCount()); } else { ItemScatterer.spawn(world, pos.getX(), pos.getY(), pos.getZ(), remainingStack); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 2c6a2c8..27beddd 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "carpet-autocraftingtable", - "version": "1.4.35", + "version": "1.4.56", "name": "Carpet-AutoCraftingTable", "description": "Auto-Crafting Table mod for carpet-mod, originally by Skyrising", @@ -28,7 +28,7 @@ ], "accessWidener": "act.accesswidener", "depends": { - "minecraft": "1.17.x", + "minecraft": "1.18.x", "fabricloader": ">=0.10.0", "carpet": "*" },