From 6d1a5f081cd7013f8fee0f960e342d3d46ef4bd7 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Sat, 12 Feb 2022 02:03:53 +0800 Subject: [PATCH] Properly update to 22w06a --- .github/workflows/1.18_pr.yml | 2 +- .github/workflows/1.18_push.yml | 2 +- .../architectury/registry/block/ToolType.java | 73 ------------------- fabric/build.gradle | 10 +-- .../mixin/fabric/client/MixinClientLevel.java | 3 +- .../block/fabric/BlockPropertiesImpl.java | 6 -- .../registry/block/fabric/ToolTypeImpl.java | 42 ----------- forge/build.gradle | 3 +- .../registry/block/forge/ToolTypeImpl.java | 42 ----------- gradle.properties | 4 +- 10 files changed, 9 insertions(+), 178 deletions(-) delete mode 100644 common/src/main/java/dev/architectury/registry/block/ToolType.java delete mode 100644 fabric/src/main/java/dev/architectury/registry/block/fabric/ToolTypeImpl.java delete mode 100644 forge/src/main/java/dev/architectury/registry/block/forge/ToolTypeImpl.java diff --git a/.github/workflows/1.18_pr.yml b/.github/workflows/1.18_pr.yml index a10e06d7..0ced38ed 100644 --- a/.github/workflows/1.18_pr.yml +++ b/.github/workflows/1.18_pr.yml @@ -7,7 +7,7 @@ on: - '**.properties' - '**/src/**' branches: - - "1.18" + - "1.18.2" types: [ opened, synchronize, reopened ] jobs: validate-gradle: diff --git a/.github/workflows/1.18_push.yml b/.github/workflows/1.18_push.yml index ecd5ee0a..49de097d 100644 --- a/.github/workflows/1.18_push.yml +++ b/.github/workflows/1.18_push.yml @@ -7,7 +7,7 @@ on: - '**.properties' - '**/src/**' branches: - - "1.18" + - "1.18.2" workflow_dispatch: inputs: norelease: diff --git a/common/src/main/java/dev/architectury/registry/block/ToolType.java b/common/src/main/java/dev/architectury/registry/block/ToolType.java deleted file mode 100644 index c3a84422..00000000 --- a/common/src/main/java/dev/architectury/registry/block/ToolType.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * This file is part of architectury. - * Copyright (C) 2020, 2021, 2022 architectury - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package dev.architectury.registry.block; - -import com.google.common.collect.Maps; -import dev.architectury.injectables.annotations.ExpectPlatform; -import net.minecraft.tags.Tag; -import net.minecraft.world.item.Item; - -import java.util.Map; -import java.util.function.Supplier; - -public final class ToolType { - private static final Map TYPES = Maps.newConcurrentMap(); - public static final ToolType PICKAXE = create("pickaxe", ToolType::pickaxeTag); - public static final ToolType AXE = create("axe", ToolType::axeTag); - public static final ToolType HOE = create("hoe", ToolType::hoeTag); - public static final ToolType SHOVEL = create("shovel", ToolType::shovelTag); - - @ExpectPlatform - private static Tag pickaxeTag() { - throw new AssertionError(); - } - - @ExpectPlatform - private static Tag axeTag() { - throw new AssertionError(); - } - - @ExpectPlatform - private static Tag hoeTag() { - throw new AssertionError(); - } - - @ExpectPlatform - private static Tag shovelTag() { - throw new AssertionError(); - } - - public final String forgeName; - public final Supplier> fabricTag; - private Object obj; - - private ToolType(String forgeName, Supplier> fabricTag) { - this.forgeName = forgeName; - this.fabricTag = fabricTag; - } - - public static ToolType create(String forgeName, Supplier> fabricTag) { - return TYPES.computeIfAbsent(forgeName, s -> new ToolType(s, fabricTag)); - } - - public static ToolType byName(String forgeName) { - return TYPES.get(forgeName); - } -} diff --git a/fabric/build.gradle b/fabric/build.gradle index 2d884c86..21d2c203 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -26,12 +26,7 @@ repositories { dependencies { modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" - modCompileOnly "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}" - modRuntimeOnly("net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}") { - // temp workaround to test arch - exclude module: "fabric-rendering-fluids-v1" - exclude module: "fabric-transfer-api-v1" - } + modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}" modCompileOnly("com.terraformersmc:modmenu:${rootProject.mod_menu_version}") { transitive false } common(project(path: ":common", configuration: "namedElements")) { transitive false } @@ -110,8 +105,7 @@ curseforge { releaseType = "$rootProject.cf_type" changelogType = "html" changelog = releaseChangelog() - addGameVersion "1.18.1" - addGameVersion "1.18" + // addGameVersion "1.18.1" addGameVersion "1.18-Snapshot" addGameVersion "Java 17" addGameVersion "Fabric" diff --git a/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinClientLevel.java b/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinClientLevel.java index e6a5127f..669865b8 100644 --- a/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinClientLevel.java +++ b/fabric/src/main/java/dev/architectury/mixin/fabric/client/MixinClientLevel.java @@ -24,6 +24,7 @@ import dev.architectury.event.events.common.EntityEvent; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.client.renderer.LevelRenderer; +import net.minecraft.core.Holder; import net.minecraft.resources.ResourceKey; import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.world.entity.Entity; @@ -39,7 +40,7 @@ import java.util.function.Supplier; @Mixin(ClientLevel.class) public class MixinClientLevel { @Inject(method = "", at = @At("RETURN")) - private void construct(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey, DimensionType dimensionType, int i, int j, Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) { + private void construct(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey resourceKey, Holder holder, int i, int j, Supplier supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) { ClientLifecycleEvent.CLIENT_LEVEL_LOAD.invoker().act((ClientLevel) (Object) this); } diff --git a/fabric/src/main/java/dev/architectury/registry/block/fabric/BlockPropertiesImpl.java b/fabric/src/main/java/dev/architectury/registry/block/fabric/BlockPropertiesImpl.java index ead1c27c..0ee81346 100644 --- a/fabric/src/main/java/dev/architectury/registry/block/fabric/BlockPropertiesImpl.java +++ b/fabric/src/main/java/dev/architectury/registry/block/fabric/BlockPropertiesImpl.java @@ -20,7 +20,6 @@ package dev.architectury.registry.block.fabric; import dev.architectury.registry.block.BlockProperties; -import net.fabricmc.fabric.impl.object.builder.BlockSettingsInternals; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Material; @@ -57,11 +56,6 @@ public class BlockPropertiesImpl { properties.canOcclude = old.canOcclude; properties.isAir = old.isAir; properties.requiresCorrectToolForDrops = old.requiresCorrectToolForDrops; - var otherInternals = (BlockSettingsInternals) old; - var extraData = otherInternals.getExtraData(); - if (extraData != null) { - ((BlockSettingsInternals) properties).setExtraData(extraData); - } return properties; } diff --git a/fabric/src/main/java/dev/architectury/registry/block/fabric/ToolTypeImpl.java b/fabric/src/main/java/dev/architectury/registry/block/fabric/ToolTypeImpl.java deleted file mode 100644 index 25d61973..00000000 --- a/fabric/src/main/java/dev/architectury/registry/block/fabric/ToolTypeImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of architectury. - * Copyright (C) 2020, 2021, 2022 architectury - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package dev.architectury.registry.block.fabric; - -import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags; -import net.minecraft.tags.Tag; -import net.minecraft.world.item.Item; - -public class ToolTypeImpl { - public static Tag pickaxeTag() { - return FabricToolTags.PICKAXES; - } - - public static Tag axeTag() { - return FabricToolTags.AXES; - } - - public static Tag hoeTag() { - return FabricToolTags.HOES; - } - - public static Tag shovelTag() { - return FabricToolTags.SHOVELS; - } -} diff --git a/forge/build.gradle b/forge/build.gradle index 2e27e067..72f52b37 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -103,8 +103,7 @@ curseforge { releaseType = "$rootProject.cf_type" changelogType = "html" changelog = releaseChangelog() - addGameVersion "1.18.1" - addGameVersion "1.18" + // addGameVersion "1.18.2" addGameVersion "Java 17" addGameVersion "Forge" mainArtifact(remapJar.archivePath) { diff --git a/forge/src/main/java/dev/architectury/registry/block/forge/ToolTypeImpl.java b/forge/src/main/java/dev/architectury/registry/block/forge/ToolTypeImpl.java deleted file mode 100644 index 6a2ae0e9..00000000 --- a/forge/src/main/java/dev/architectury/registry/block/forge/ToolTypeImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of architectury. - * Copyright (C) 2020, 2021, 2022 architectury - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package dev.architectury.registry.block.forge; - - -import net.minecraft.tags.Tag; -import net.minecraft.world.item.Item; - -public class ToolTypeImpl { - public static Tag pickaxeTag() { - return null; - } - - public static Tag axeTag() { - return null; - } - - public static Tag hoeTag() { - return null; - } - - public static Tag shovelTag() { - return null; - } -} diff --git a/gradle.properties b/gradle.properties index eb35e949..4ea33151 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ forgeEnabled=false minecraft_version=22w06a supported_version=1.18.2 (22w06a) -cf_type=release +cf_type=beta archives_base_name=architectury archives_base_name_snapshot=architectury-snapshot @@ -14,7 +14,7 @@ base_version=3.6 maven_group=dev.architectury fabric_loader_version=0.12.12 -fabric_api_version=0.46.2+1.18 +fabric_api_version=0.47.0+1.18.2 mod_menu_version=3.0.0 forge_version=38.0.17