Interface HopperMoveItemEvent
- All Superinterfaces:
Cancellable, Event, HopperEvent
Fired when a hopper is about to move items: pushing them into the container its spout faces, or
pulling them from the container above it.
Cancelling it leaves the items where they are, and the hopper waits its cooldown as if it had moved them: a move refused every time does not fire on every game tick.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the container the items go to, such as a large chest, seen whole.Returns where the items go: the container its spout faces when it pushes, the hopper when it pulls.booleanisPush()Returnstruewhen the hopper pushes the items out,falsewhen it pulls them in.item()Returns the items that move, taken from one slot: as many as the hopper moves at once, or fewer when that slot or the room of the destination holds fewer.source()Returns the container the items come from, such as a large chest, seen whole.Returns where the items come from: the hopper when it pushes, the container above it when it pulls.Methods inherited from interface Cancellable
isCancelled, setCancelledMethods inherited from interface HopperEvent
hopper, position, world
-
Method Details
-
isPush
boolean isPush()Returnstruewhen the hopper pushes the items out,falsewhen it pulls them in.- Returns:
truewhen the hopper pushes the items out,falsewhen it pulls them in- Since:
- 0.1.0
-
sourcePosition
BlockPosition sourcePosition()Returns where the items come from: the hopper when it pushes, the container above it when it pulls.- Returns:
- where the items come from: the hopper when it pushes, the container above it when it pulls
- Since:
- 0.1.0
-
destinationPosition
BlockPosition destinationPosition()Returns where the items go: the container its spout faces when it pushes, the hopper when it pulls.- Returns:
- where the items go: the container its spout faces when it pushes, the hopper when it pulls
- Since:
- 0.1.0
-
source
Container source()Returns the container the items come from, such as a large chest, seen whole.- Returns:
- the container the items come from, such as a large chest, seen whole
- Since:
- 0.1.0
-
destination
Container destination()Returns the container the items go to, such as a large chest, seen whole.- Returns:
- the container the items go to, such as a large chest, seen whole
- Since:
- 0.1.0
-
item
ItemStack item()Returns the items that move, taken from one slot: as many as the hopper moves at once, or fewer when that slot or the room of the destination holds fewer.- Returns:
- the items that move, taken from one slot: as many as the hopper moves at once, or fewer when that slot or the room of the destination holds fewer
- Since:
- 0.1.0
-