diff --git a/src/mixins/java/org/spongepowered/common/mixin/core/world/item/enchantment/EnchantmentMixin.java b/src/mixins/java/org/spongepowered/common/mixin/core/world/item/enchantment/EnchantmentMixin.java index eebf32886a5..7a7e159176c 100644 --- a/src/mixins/java/org/spongepowered/common/mixin/core/world/item/enchantment/EnchantmentMixin.java +++ b/src/mixins/java/org/spongepowered/common/mixin/core/world/item/enchantment/EnchantmentMixin.java @@ -25,12 +25,11 @@ package org.spongepowered.common.mixin.core.world.item.enchantment; import com.google.common.base.MoreObjects; -import net.minecraft.core.registries.Registries; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.item.enchantment.Enchantment; import org.spongepowered.api.ResourceKey; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.common.SpongeCommon; @Mixin(Enchantment.class) public abstract class EnchantmentMixin { @@ -41,7 +40,7 @@ public abstract class EnchantmentMixin { @Override public String toString() { - final ResourceKey key = (ResourceKey) (Object) SpongeCommon.vanillaRegistry(Registries.ENCHANTMENT).getKey((Enchantment) (Object) this); + final ResourceKey key = (ResourceKey) (Object) BuiltInRegistries.ENCHANTMENT.getKey((Enchantment) (Object) this); return MoreObjects.toStringHelper("EnchantmentType") .add("Name", this.shadow$getDescriptionId()) .add("Key", key) diff --git a/src/mixins/java/org/spongepowered/common/mixin/core/world/level/block/entity/BlockEntityMixin.java b/src/mixins/java/org/spongepowered/common/mixin/core/world/level/block/entity/BlockEntityMixin.java index 58902c254a0..3a493d725d4 100644 --- a/src/mixins/java/org/spongepowered/common/mixin/core/world/level/block/entity/BlockEntityMixin.java +++ b/src/mixins/java/org/spongepowered/common/mixin/core/world/level/block/entity/BlockEntityMixin.java @@ -26,7 +26,7 @@ import com.google.common.base.MoreObjects; import net.minecraft.core.BlockPos; -import net.minecraft.core.registries.Registries; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; @@ -38,7 +38,6 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.common.SpongeCommon; import org.spongepowered.common.bridge.data.DataCompoundHolder; import org.spongepowered.common.bridge.world.level.block.entity.BlockEntityBridge; import org.spongepowered.common.data.DataUtil; @@ -96,7 +95,7 @@ public abstract class BlockEntityMixin implements BlockEntityBridge, DataCompoun @Override public String toString() { - final ResourceKey key = (ResourceKey) (Object) SpongeCommon.vanillaRegistry(Registries.BLOCK_ENTITY_TYPE).getKey(this.type); + final ResourceKey key = (ResourceKey) (Object) BuiltInRegistries.BLOCK_ENTITY_TYPE.getKey(this.type); return MoreObjects.toStringHelper(this) // Double check some mods are registering their tile entities and doing some "interesting" @@ -109,7 +108,7 @@ public String toString() { } protected MoreObjects.ToStringHelper getPrettyPrinterStringHelper() { - final ResourceKey key = (ResourceKey) (Object) SpongeCommon.vanillaRegistry(Registries.BLOCK_ENTITY_TYPE).getKey(this.type); + final ResourceKey key = (ResourceKey) (Object) BuiltInRegistries.BLOCK_ENTITY_TYPE.getKey(this.type); return MoreObjects.toStringHelper(this) .add("type", key)