Fix screwdriver duplicating terminal buffered items
This commit is contained in:
parent
f321b2a06a
commit
74aae99b36
|
@ -11,6 +11,7 @@ import net.minecraft.util.ActionResult
|
||||||
import net.minecraft.util.Identifier
|
import net.minecraft.util.Identifier
|
||||||
import net.shadowfacts.phycon.PhysicalConnectivity
|
import net.shadowfacts.phycon.PhysicalConnectivity
|
||||||
import net.shadowfacts.phycon.block.DeviceBlock
|
import net.shadowfacts.phycon.block.DeviceBlock
|
||||||
|
import net.shadowfacts.phycon.init.PhyBlocks
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author shadowfacts
|
* @author shadowfacts
|
||||||
|
@ -35,6 +36,11 @@ class ScrewdriverItem: Item(Settings()) {
|
||||||
beTag.remove("y")
|
beTag.remove("y")
|
||||||
beTag.remove("z")
|
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)
|
val entity = ItemEntity(context.world, context.blockPos.x.toDouble(), context.blockPos.y.toDouble(), context.blockPos.z.toDouble(), stack)
|
||||||
context.world.spawnEntity(entity)
|
context.world.spawnEntity(entity)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue