From 74aae99b364fc865f6b7c0de6b9c0d0c2bfe0c05 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 4 Mar 2021 22:15:18 -0500 Subject: [PATCH] Fix screwdriver duplicating terminal buffered items --- .../kotlin/net/shadowfacts/phycon/item/ScrewdriverItem.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/kotlin/net/shadowfacts/phycon/item/ScrewdriverItem.kt b/src/main/kotlin/net/shadowfacts/phycon/item/ScrewdriverItem.kt index 3dfa1f4..6168df1 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/item/ScrewdriverItem.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/item/ScrewdriverItem.kt @@ -11,6 +11,7 @@ import net.minecraft.util.ActionResult import net.minecraft.util.Identifier import net.shadowfacts.phycon.PhysicalConnectivity import net.shadowfacts.phycon.block.DeviceBlock +import net.shadowfacts.phycon.init.PhyBlocks /** * @author shadowfacts @@ -35,6 +36,11 @@ class ScrewdriverItem: Item(Settings()) { beTag.remove("y") beTag.remove("z") + if (block === PhyBlocks.TERMINAL) { + // remove the terminal's internal buffer since it drops its items + beTag.remove("InternalBuffer") + } + val entity = ItemEntity(context.world, context.blockPos.x.toDouble(), context.blockPos.y.toDouble(), context.blockPos.z.toDouble(), stack) context.world.spawnEntity(entity)