API reference / @jsprismarine/prismarine / entity/data/hangingEntities / HangingEntities
Class: HangingEntities
Defined in: packages/prismarine/src/entity/data/hangingEntities.ts:176
Runs every painting and leash knot in the store.
Constructors
Constructor
new HangingEntities(
host):HangingEntities
Defined in: packages/prismarine/src/entity/data/hangingEntities.ts:177
Parameters
host
Returns
HangingEntities
Methods
place()
place(
entity,variants):boolean
Defined in: packages/prismarine/src/entity/data/hangingEntities.ts:202
Hangs a painting freshly placed, Java's Painting.create: of the variants, the ones that survive on this wall facing this way, then of those the ones with the largest area, then one of those at random. The painting moves to where Java's hangs, against its wall.
Parameters
entity
variants
readonly PaintingVariant[]
Returns
boolean
False when nothing hangs here, so the painting must not be placed; true for an entity that is no painting or already shows a picture.
Java Source
Painting.create
update()
update(
entity):void
Defined in: packages/prismarine/src/entity/data/hangingEntities.ts:180
One tick of one hanging entity: a tick older, and on its check, the break when nothing holds it.
Parameters
entity
Returns
void