From 159a3a0bf8e1e1841703b150fb6dc0113935c7c9 Mon Sep 17 00:00:00 2001 From: 90 Date: Tue, 30 Apr 2024 21:42:05 +0100 Subject: [PATCH] Remove an unnecessary non-API use --- src/main/java/gripe/_90/appliede/AppliedE.java | 2 -- .../gripe/_90/appliede/iface/EMCInterfaceBlockEntity.java | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/gripe/_90/appliede/AppliedE.java b/src/main/java/gripe/_90/appliede/AppliedE.java index 3958713..2acafdc 100644 --- a/src/main/java/gripe/_90/appliede/AppliedE.java +++ b/src/main/java/gripe/_90/appliede/AppliedE.java @@ -28,7 +28,6 @@ import appeng.api.parts.IPartItem; import appeng.api.parts.PartModels; import appeng.api.stacks.AEKeyTypes; -import appeng.blockentity.AEBaseBlockEntity; import appeng.core.AppEng; import appeng.core.definitions.AEBlocks; import appeng.core.definitions.AEItems; @@ -83,7 +82,6 @@ public final class AppliedE { public static final RegistryObject> EMC_INTERFACE_BE = BE_TYPES.register("emc_interface", () -> { var type = BlockEntityType.Builder.of(EMCInterfaceBlockEntity::new, EMC_INTERFACE.get()).build(null); EMC_INTERFACE.get().setBlockEntity(EMCInterfaceBlockEntity.class, type, null, null); - AEBaseBlockEntity.registerBlockEntityItem(type, EMC_INTERFACE.get().asItem()); return type; }); diff --git a/src/main/java/gripe/_90/appliede/iface/EMCInterfaceBlockEntity.java b/src/main/java/gripe/_90/appliede/iface/EMCInterfaceBlockEntity.java index a770a8d..ded1efc 100644 --- a/src/main/java/gripe/_90/appliede/iface/EMCInterfaceBlockEntity.java +++ b/src/main/java/gripe/_90/appliede/iface/EMCInterfaceBlockEntity.java @@ -8,6 +8,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; @@ -73,6 +74,11 @@ public void clearContent() { getStorage().clear(); } + @Override + protected Item getItemFromBlockEntity() { + return AppliedE.EMC_INTERFACE.get().asItem(); + } + @Override public ItemStack getMainMenuIcon() { return AppliedE.EMC_INTERFACE.get().asItem().getDefaultInstance();