From 416b6f7c2de472505ec4becd2440fe131f6d764b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E6=82=A6=E8=A7=A3=E8=AF=B4?= Date: Sun, 22 Sep 2024 00:11:35 +0800 Subject: [PATCH] Fixed bugs --- .../forge/mixin/AbstractMinecartContainerMixin.java | 2 +- .../ziyue/tjmetro/mapping/ContainerAccessor.java | 12 +----------- .../tjmetro/mapping/MetalDetectionDoorEntity.java | 2 +- .../java/ziyue/tjmetro/mapping/RegistryHelper.java | 4 ++-- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/forge/src/main/java/ziyue/tjmetro/forge/mixin/AbstractMinecartContainerMixin.java b/forge/src/main/java/ziyue/tjmetro/forge/mixin/AbstractMinecartContainerMixin.java index 20e8ddd..145ce30 100644 --- a/forge/src/main/java/ziyue/tjmetro/forge/mixin/AbstractMinecartContainerMixin.java +++ b/forge/src/main/java/ziyue/tjmetro/forge/mixin/AbstractMinecartContainerMixin.java @@ -6,7 +6,7 @@ * @since 1.0.0-beta-2 */ -#if MC_VERSION >= "11902" +#if MC_VERSION >= "11904" import net.minecraft.core.NonNullList; import net.minecraft.world.Container; diff --git a/forge/src/main/java/ziyue/tjmetro/mapping/ContainerAccessor.java b/forge/src/main/java/ziyue/tjmetro/mapping/ContainerAccessor.java index a8e4e22..7121904 100644 --- a/forge/src/main/java/ziyue/tjmetro/mapping/ContainerAccessor.java +++ b/forge/src/main/java/ziyue/tjmetro/mapping/ContainerAccessor.java @@ -6,17 +6,7 @@ * @since 1.0.0-beta-2 */ -#if MC_VERSION >= "11902" - -import net.minecraft.core.NonNullList; -import net.minecraft.world.item.ItemStack; - -public interface ContainerAccessor -{ - NonNullList tianjin_Metro$getItemStacks(); -} - -#elif MC_VERSION >= "11701" +#if MC_VERSION >= "11701" import net.minecraft.core.NonNullList; import net.minecraft.world.item.ItemStack; diff --git a/forge/src/main/java/ziyue/tjmetro/mapping/MetalDetectionDoorEntity.java b/forge/src/main/java/ziyue/tjmetro/mapping/MetalDetectionDoorEntity.java index a9bb97d..a548c24 100644 --- a/forge/src/main/java/ziyue/tjmetro/mapping/MetalDetectionDoorEntity.java +++ b/forge/src/main/java/ziyue/tjmetro/mapping/MetalDetectionDoorEntity.java @@ -8,7 +8,7 @@ * @since 1.0.0-beta-2 */ -#if MC_VERSION >= "11902" +#if MC_VERSION >= "11904" import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; diff --git a/forge/src/main/java/ziyue/tjmetro/mapping/RegistryHelper.java b/forge/src/main/java/ziyue/tjmetro/mapping/RegistryHelper.java index 18000a3..a894efc 100644 --- a/forge/src/main/java/ziyue/tjmetro/mapping/RegistryHelper.java +++ b/forge/src/main/java/ziyue/tjmetro/mapping/RegistryHelper.java @@ -30,7 +30,7 @@ static net.minecraft.world.item.ItemStack cloneSingleItemStack(net.minecraft.wor } static Identifier getIdentifierByItem(net.minecraft.world.item.Item item) { -#if MC_VERSION >= "11902" +#if MC_VERSION >= "11904" return new Identifier(net.minecraft.core.registries.BuiltInRegistries.ITEM.getKey(item)); #else return new Identifier(net.minecraft.core.Registry.ITEM.getKey(item)); @@ -38,7 +38,7 @@ static Identifier getIdentifierByItem(net.minecraft.world.item.Item item) { } static net.minecraft.world.item.ItemStack getItemStackByIdentifier(Identifier identifier) { -#if MC_VERSION >= "11902" +#if MC_VERSION >= "11904" return net.minecraft.core.registries.BuiltInRegistries.ITEM.get(identifier.data).getDefaultInstance(); #else return net.minecraft.core.Registry.ITEM.get(identifier.data).getDefaultInstance();