mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Properly update to 22w06a
This commit is contained in:
2
.github/workflows/1.18_pr.yml
vendored
2
.github/workflows/1.18_pr.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
- '**.properties'
|
||||
- '**/src/**'
|
||||
branches:
|
||||
- "1.18"
|
||||
- "1.18.2"
|
||||
types: [ opened, synchronize, reopened ]
|
||||
jobs:
|
||||
validate-gradle:
|
||||
|
||||
2
.github/workflows/1.18_push.yml
vendored
2
.github/workflows/1.18_push.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
- '**.properties'
|
||||
- '**/src/**'
|
||||
branches:
|
||||
- "1.18"
|
||||
- "1.18.2"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
norelease:
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
|
||||
@@ -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 = "<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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user