diff --git a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java index 2a5e61a27..341e4cfb2 100644 --- a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java +++ b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java @@ -29,7 +29,6 @@ import net.id.paradiselost.items.ParadiseLostItems; import net.id.paradiselost.registry.ParadiseLostRegistryQueues; import net.id.paradiselost.tag.ParadiseLostBlockTags; -import net.id.paradiselost.util.RenderUtils; import net.id.paradiselost.world.feature.tree.generator.*; import net.id.incubus_core.util.RegistryQueue.Action; import net.id.incubus_core.woodtypefactory.api.WoodSettingsFactory; @@ -40,7 +39,6 @@ import net.minecraft.sound.BlockSoundGroup; import net.minecraft.state.property.Properties; import net.minecraft.tag.BlockTags; -import net.minecraft.util.math.Vec3i; import net.minecraft.util.math.intprovider.UniformIntProvider; import net.minecraft.util.registry.Registry; diff --git a/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java b/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java index 41a88f6ee..b0f0d80f0 100644 --- a/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java +++ b/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java @@ -3,7 +3,6 @@ import net.id.incubus_core.be.InventoryBlockEntity; import net.id.paradiselost.recipe.ParadiseLostRecipeTypes; import net.id.paradiselost.recipe.TreeTapRecipe; -import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.HopperBlockEntity; @@ -20,7 +19,6 @@ import net.minecraft.sound.SoundEvents; import net.minecraft.state.property.Properties; import net.minecraft.util.Hand; -import net.minecraft.util.ItemScatterer; import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; @@ -112,13 +110,13 @@ public void tryCraft() { stack.decrement(1); if (!world.isClient) world.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, 0.5f, world.getRandom().nextFloat() * 0.4f + 0.8f); - this.inventory.set(0, ItemStack.EMPTY); + inventoryChanged(); BlockEntity possibleHopper = world.getBlockEntity(pos.down()); - if (possibleHopper instanceof HopperBlockEntity) { + if (possibleHopper instanceof Inventory) { output = HopperBlockEntity.transfer(this, (Inventory) possibleHopper, output, Direction.UP); } - ItemScatterer.spawn(world, pos.getX(), pos.getY(), pos.getZ(), output); + this.inventory.set(0, output); } }