Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PTOM76 committed Sep 18, 2024
1 parent 1ad0a34 commit 64700c4
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/main/java/net/pitan76/itemalchemy/block/EMCImporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@
import net.minecraft.block.MapColor;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.inventory.Inventory;
import net.minecraft.text.Text;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.pitan76.itemalchemy.tile.EMCImporterTile;
import net.pitan76.itemalchemy.tile.Tiles;
import net.pitan76.mcpitanlib.api.block.CompatibleBlockSettings;
import net.pitan76.mcpitanlib.api.block.ExtendBlock;
import net.pitan76.mcpitanlib.api.block.ExtendBlockEntityProvider;
import net.pitan76.mcpitanlib.api.event.block.BlockUseEvent;
import net.pitan76.mcpitanlib.api.event.block.ItemScattererUtil;
import net.pitan76.mcpitanlib.api.event.block.StateReplacedEvent;
import net.pitan76.mcpitanlib.api.util.ItemStackUtil;
import net.pitan76.mcpitanlib.api.util.TextUtil;
import net.pitan76.mcpitanlib.api.util.WorldUtil;
import net.pitan76.mcpitanlib.core.serialization.CompatMapCodec;
import org.jetbrains.annotations.Nullable;

Expand All @@ -44,17 +38,6 @@ public EMCImporter() {

@Override
public void onStateReplaced(StateReplacedEvent e) {
World world = e.world;
BlockPos pos = e.pos;
if (e.isSameState()) return;

BlockEntity blockEntity = WorldUtil.getBlockEntity(world, pos);
if (blockEntity instanceof Inventory) {
Inventory inventory = (Inventory) blockEntity;
inventory.setStack(1, ItemStackUtil.empty());
ItemScattererUtil.spawn(world, pos, inventory);
e.updateComparators();
}
super.onStateReplaced(e);
}

Expand Down

0 comments on commit 64700c4

Please sign in to comment.