Properly update to 22w06a

This commit is contained in:
shedaniel
2022-02-12 02:03:53 +08:00
parent 6dff58485f
commit 6d1a5f081c
10 changed files with 9 additions and 178 deletions

View File

@@ -7,7 +7,7 @@ on:
- '**.properties' - '**.properties'
- '**/src/**' - '**/src/**'
branches: branches:
- "1.18" - "1.18.2"
types: [ opened, synchronize, reopened ] types: [ opened, synchronize, reopened ]
jobs: jobs:
validate-gradle: validate-gradle:

View File

@@ -7,7 +7,7 @@ on:
- '**.properties' - '**.properties'
- '**/src/**' - '**/src/**'
branches: branches:
- "1.18" - "1.18.2"
workflow_dispatch: workflow_dispatch:
inputs: inputs:
norelease: norelease:

View File

@@ -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<String, ToolType> 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<Item> pickaxeTag() {
throw new AssertionError();
}
@ExpectPlatform
private static Tag<Item> axeTag() {
throw new AssertionError();
}
@ExpectPlatform
private static Tag<Item> hoeTag() {
throw new AssertionError();
}
@ExpectPlatform
private static Tag<Item> shovelTag() {
throw new AssertionError();
}
public final String forgeName;
public final Supplier<Tag<Item>> fabricTag;
private Object obj;
private ToolType(String forgeName, Supplier<Tag<Item>> fabricTag) {
this.forgeName = forgeName;
this.fabricTag = fabricTag;
}
public static ToolType create(String forgeName, Supplier<Tag<Item>> fabricTag) {
return TYPES.computeIfAbsent(forgeName, s -> new ToolType(s, fabricTag));
}
public static ToolType byName(String forgeName) {
return TYPES.get(forgeName);
}
}

View File

@@ -26,12 +26,7 @@ repositories {
dependencies { dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modCompileOnly "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}" modImplementation "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"
}
modCompileOnly("com.terraformersmc:modmenu:${rootProject.mod_menu_version}") { transitive false } modCompileOnly("com.terraformersmc:modmenu:${rootProject.mod_menu_version}") { transitive false }
common(project(path: ":common", configuration: "namedElements")) { transitive false } common(project(path: ":common", configuration: "namedElements")) { transitive false }
@@ -110,8 +105,7 @@ curseforge {
releaseType = "$rootProject.cf_type" releaseType = "$rootProject.cf_type"
changelogType = "html" changelogType = "html"
changelog = releaseChangelog() changelog = releaseChangelog()
addGameVersion "1.18.1" // addGameVersion "1.18.1"
addGameVersion "1.18"
addGameVersion "1.18-Snapshot" addGameVersion "1.18-Snapshot"
addGameVersion "Java 17" addGameVersion "Java 17"
addGameVersion "Fabric" addGameVersion "Fabric"

View File

@@ -24,6 +24,7 @@ import dev.architectury.event.events.common.EntityEvent;
import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.multiplayer.ClientPacketListener; import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.client.renderer.LevelRenderer; import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.core.Holder;
import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceKey;
import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.util.profiling.ProfilerFiller;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
@@ -39,7 +40,7 @@ import java.util.function.Supplier;
@Mixin(ClientLevel.class) @Mixin(ClientLevel.class)
public class MixinClientLevel { public class MixinClientLevel {
@Inject(method = "<init>", at = @At("RETURN")) @Inject(method = "<init>", at = @At("RETURN"))
private void construct(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey<Level> resourceKey, DimensionType dimensionType, int i, int j, Supplier<ProfilerFiller> supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) { private void construct(ClientPacketListener clientPacketListener, ClientLevel.ClientLevelData clientLevelData, ResourceKey<Level> resourceKey, Holder<DimensionType> holder, int i, int j, Supplier<ProfilerFiller> supplier, LevelRenderer levelRenderer, boolean bl, long l, CallbackInfo ci) {
ClientLifecycleEvent.CLIENT_LEVEL_LOAD.invoker().act((ClientLevel) (Object) this); ClientLifecycleEvent.CLIENT_LEVEL_LOAD.invoker().act((ClientLevel) (Object) this);
} }

View File

@@ -20,7 +20,6 @@
package dev.architectury.registry.block.fabric; package dev.architectury.registry.block.fabric;
import dev.architectury.registry.block.BlockProperties; 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.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
@@ -57,11 +56,6 @@ public class BlockPropertiesImpl {
properties.canOcclude = old.canOcclude; properties.canOcclude = old.canOcclude;
properties.isAir = old.isAir; properties.isAir = old.isAir;
properties.requiresCorrectToolForDrops = old.requiresCorrectToolForDrops; properties.requiresCorrectToolForDrops = old.requiresCorrectToolForDrops;
var otherInternals = (BlockSettingsInternals) old;
var extraData = otherInternals.getExtraData();
if (extraData != null) {
((BlockSettingsInternals) properties).setExtraData(extraData);
}
return properties; return properties;
} }

View File

@@ -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<Item> pickaxeTag() {
return FabricToolTags.PICKAXES;
}
public static Tag<Item> axeTag() {
return FabricToolTags.AXES;
}
public static Tag<Item> hoeTag() {
return FabricToolTags.HOES;
}
public static Tag<Item> shovelTag() {
return FabricToolTags.SHOVELS;
}
}

View File

@@ -103,8 +103,7 @@ curseforge {
releaseType = "$rootProject.cf_type" releaseType = "$rootProject.cf_type"
changelogType = "html" changelogType = "html"
changelog = releaseChangelog() changelog = releaseChangelog()
addGameVersion "1.18.1" // addGameVersion "1.18.2"
addGameVersion "1.18"
addGameVersion "Java 17" addGameVersion "Java 17"
addGameVersion "Forge" addGameVersion "Forge"
mainArtifact(remapJar.archivePath) { mainArtifact(remapJar.archivePath) {

View File

@@ -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<Item> pickaxeTag() {
return null;
}
public static Tag<Item> axeTag() {
return null;
}
public static Tag<Item> hoeTag() {
return null;
}
public static Tag<Item> shovelTag() {
return null;
}
}

View File

@@ -6,7 +6,7 @@ forgeEnabled=false
minecraft_version=22w06a minecraft_version=22w06a
supported_version=1.18.2 (22w06a) supported_version=1.18.2 (22w06a)
cf_type=release cf_type=beta
archives_base_name=architectury archives_base_name=architectury
archives_base_name_snapshot=architectury-snapshot archives_base_name_snapshot=architectury-snapshot
@@ -14,7 +14,7 @@ base_version=3.6
maven_group=dev.architectury maven_group=dev.architectury
fabric_loader_version=0.12.12 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 mod_menu_version=3.0.0
forge_version=38.0.17 forge_version=38.0.17