API reference / @jsprismarine/prismarine / world/hopperWorld / HopperPass
Class: HopperPass
Defined in: packages/prismarine/src/world/hopperWorld.ts:267
One hopper's tick of a live world.
Implements
Constructors
Constructor
new HopperPass(
options):HopperPass
Defined in: packages/prismarine/src/world/hopperWorld.ts:271
Parameters
options
Returns
HopperPass
Properties
gameTime
readonlygameTime:number
Defined in: packages/prismarine/src/world/hopperWorld.ts:268
The game tick now.
Java See
LevelAccessor.getGameTime
Implementation of
Methods
blocksPickup()
blocksPickup(
at):boolean
Defined in: packages/prismarine/src/world/hopperWorld.ts:314
Whether the block keeps dropped stacks from the hopper under it: Java's full collision cube, unless the block is in #minecraft:does_not_block_hoppers.
Parameters
at
Returns
boolean
Implementation of
commit()
commit(): readonly
ChangedContainer[]
Defined in: packages/prismarine/src/world/hopperWorld.ts:340
Writes every container the tick changed to its block entities.
Returns
readonly ChangedContainer[]
containerAt()
containerAt(
at):StagedContainer|undefined
Defined in: packages/prismarine/src/world/hopperWorld.ts:284
The container in a block, read once a pass: both halves of a double chest, in Java's order, are one container whichever half is asked for.
Parameters
at
Returns
StagedContainer | undefined
Implementation of
hopperAt()
hopperAt(
at):HopperBlock|undefined
Defined in: packages/prismarine/src/world/hopperWorld.ts:300
The hopper a block is, or undefined when it is none.
Parameters
at
The hopper's block.
Returns
HopperBlock | undefined
itemsAbove()
itemsAbove(
hopper): readonlyHopperItemEntity[]
Defined in: packages/prismarine/src/world/hopperWorld.ts:327
The dropped stacks in the hopper's suck box, in ascending runtime id order.
Parameters
hopper
Returns
readonly HopperItemEntity[]
Implementation of
maxStackOf()
maxStackOf(
item):number
Defined in: packages/prismarine/src/world/hopperWorld.ts:276
The most of one item a stack holds, from the content's item types.
Parameters
item
Returns
number
Implementation of
takeItem()
takeItem(
id,count):ItemDrop|undefined
Defined in: packages/prismarine/src/world/hopperWorld.ts:335
Takes up to count items from a dropped stack.
Parameters
id
number
count
number
Returns
ItemDrop | undefined