API reference / @jsprismarine/prismarine / world/hopperWorld
world/hopperWorld
Classes
Interfaces
ChangedContainer
Defined in: packages/prismarine/src/world/hopperWorld.ts:240
A container a pass changed, for whoever has it open and the comparators reading it.
Properties
blocks
readonlyblocks: readonlyContentPosition[]
Defined in: packages/prismarine/src/world/hopperWorld.ts:242
Each block whose slots changed.
screens
readonlyscreens: readonlyobject[]
Defined in: packages/prismarine/src/world/hopperWorld.ts:247
The block each screen of it can be open at, with the changed slots numbered as the screen numbers them: both halves of a double chest show all 54.
HopperPassOptions
Defined in: packages/prismarine/src/world/hopperWorld.ts:251
What a HopperPass reads of the world.
Properties
blocks
readonlyblocks:WorldActions
Defined in: packages/prismarine/src/world/hopperWorld.ts:253
The blocks and block entities of the hopper's dimension.
content
readonlycontent:ServerContent
Defined in: packages/prismarine/src/world/hopperWorld.ts:254
gameTime
readonlygameTime:number
Defined in: packages/prismarine/src/world/hopperWorld.ts:255
Methods
clockAt()
clockAt(
at):HopperClock
Defined in: packages/prismarine/src/world/hopperWorld.ts:257
The timers of the hopper at a position, created on first use.
Parameters
at
Returns
itemsNear()
itemsNear(
center,radius): readonly (HopperItemEntity&object)[]
Defined in: packages/prismarine/src/world/hopperWorld.ts:259
The dropped stacks within a distance across of a point, lying at the bottom of their boxes.
Parameters
center
radius
number
Returns
readonly (HopperItemEntity & object)[]
takeItem()
takeItem(
id,count):ItemDrop|undefined
Defined in: packages/prismarine/src/world/hopperWorld.ts:261
Takes up to count items from a dropped stack.
Parameters
id
number
count
number
Returns
ItemDrop | undefined