[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / world/beacon

# world/beacon

## Interfaces

### BeaconBlocks

Defined in: [packages/prismarine/src/world/beacon.ts:81](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L81)

What a beacon's beam reads of the blocks above it.

#### Properties

##### maxY

> `readonly` **maxY**: `number`

Defined in: [packages/prismarine/src/world/beacon.ts:85](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L85)

The dimension's highest block y.

#### Methods

##### stopsBeam()

> **stopsBeam**(`x`, `y`, `z`): `boolean`

Defined in: [packages/prismarine/src/world/beacon.ts:83](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L83)

Whether the block at a position stops the beam. False when it is not loaded.

###### Parameters

###### x

`number`

###### y

`number`

###### z

`number`

###### Returns

`boolean`

***

### BeaconEffects

Defined in: [packages/prismarine/src/world/beacon.ts:68](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L68)

The effects a beacon has chosen, by namespaced id, or null for none.

#### Properties

##### primary

> `readonly` **primary**: `string` \| `null`

Defined in: [packages/prismarine/src/world/beacon.ts:69](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L69)

##### secondary

> `readonly` **secondary**: `string` \| `null`

Defined in: [packages/prismarine/src/world/beacon.ts:70](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L70)

***

### BeaconPlayer

Defined in: [packages/prismarine/src/world/beacon.ts:342](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L342)

A player a beacon's pulse may reach.

#### Properties

##### feet

> `readonly` **feet**: `BlockXYZ`

Defined in: [packages/prismarine/src/world/beacon.ts:344](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L344)

Where its feet are.

#### Methods

##### addStatusEffect()

> **addStatusEffect**(`effect`): `unknown`

Defined in: [packages/prismarine/src/world/beacon.ts:346](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L346)

Gives it one effect.

###### Parameters

###### effect

[`StatusEffectInput`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/StatusEffect/index.md#statuseffectinput)

###### Returns

`unknown`

***

### BeaconPower

Defined in: [packages/prismarine/src/world/beacon.ts:169](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L169)

One effect a beacon gives, and its amplifier.

#### Properties

##### amplifier

> `readonly` **amplifier**: `number`

Defined in: [packages/prismarine/src/world/beacon.ts:171](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L171)

##### effect

> `readonly` **effect**: `string`

Defined in: [packages/prismarine/src/world/beacon.ts:170](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L170)

***

### BeaconPowers

Defined in: [packages/prismarine/src/world/beacon.ts:175](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L175)

What a beacon gives on each application: how far it reaches, for how long, and which effects.

#### Properties

##### durationTicks

> `readonly` **durationTicks**: `number`

Defined in: [packages/prismarine/src/world/beacon.ts:177](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L177)

##### effects

> `readonly` **effects**: readonly [`BeaconPower`](#beaconpower)[]

Defined in: [packages/prismarine/src/world/beacon.ts:178](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L178)

##### range

> `readonly` **range**: `number`

Defined in: [packages/prismarine/src/world/beacon.ts:176](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L176)

***

### BeaconPulse

Defined in: [packages/prismarine/src/world/beacon.ts:350](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L350)

What one pulse of a beacon did.

#### Properties

##### active

> `readonly` **active**: `boolean`

Defined in: [packages/prismarine/src/world/beacon.ts:354](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L354)

Whether the beacon is active: on a pyramid, with its beam reaching the sky.

##### screen

> `readonly` **screen**: `ReadonlyMap`\<`number`, `number`\>

Defined in: [packages/prismarine/src/world/beacon.ts:352](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L352)

What the beacon's screen shows now.

***

### BeaconWorld

Defined in: [packages/prismarine/src/world/beacon.ts:297](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L297)

The little of a world a beacon reads and writes.

#### Extends

- `BlockEntityWorld`

#### Methods

##### blockEntityChanged()

> **blockEntityChanged**(`position`, `tags`, `before`): `void`

Defined in: [packages/prismarine/src/blockentity/blockEntityWrite.ts:60](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/blockentity/blockEntityWrite.ts#L60)

Reports that the block entity at a position is now these tags.

Called only for a write that changed something, and only once the chunk holds it.

###### Parameters

###### position

[`Vector3`](https://jsprismarine.dev/api/@jsprismarine/math/classes/Vector3.md)

The block the block entity sits in.

###### tags

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md)

Its complete data, as the chunk would serialize it.

###### before

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `null`

What stood there before the write, for the change log, or null when
  nothing did.

###### Returns

`void`

###### Inherited from

`BlockEntityWorld.blockEntityChanged`

##### getDimension()

> **getDimension**(): `DimensionBounds`

Defined in: [packages/prismarine/src/world/beacon.ts:300](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L300)

###### Returns

`DimensionBounds`

##### getLoadedChunk()

> **getLoadedChunk**(`x`, `z`): `BlockEntityChunk` \| `null`

Defined in: [packages/prismarine/src/blockentity/blockEntityWrite.ts:49](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/blockentity/blockEntityWrite.ts#L49)

The chunk holding a column, or null when it is not in memory.

###### Parameters

###### x

`number`

###### z

`number`

###### Returns

`BlockEntityChunk` \| `null`

###### Inherited from

`BlockEntityWorld.getLoadedChunk`

##### loadedBlock()

> **loadedBlock**(`x`, `y`, `z`): `BeaconBlock` \| `undefined`

Defined in: [packages/prismarine/src/world/beacon.ts:299](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L299)

The block at a position, or undefined when its chunk is not loaded.

###### Parameters

###### x

`number`

###### y

`number`

###### z

`number`

###### Returns

`BeaconBlock` \| `undefined`

##### playNamedSound()

> **playNamedSound**(`x`, `y`, `z`, `sound`): `void`

Defined in: [packages/prismarine/src/world/beacon.ts:301](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L301)

###### Parameters

###### x

`number`

###### y

`number`

###### z

`number`

###### sound

`string`

###### Returns

`void`

## Variables

### BEACON

> `const` **BEACON**: `"minecraft:beacon"` = `'minecraft:beacon'`

Defined in: [packages/prismarine/src/world/beacon.ts:25](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L25)

The beacon block.

***

### BEACON\_BLOCK\_ENTITY

> `const` **BEACON\_BLOCK\_ENTITY**: `string` \| `undefined`

Defined in: [packages/prismarine/src/world/beacon.ts:28](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L28)

The id a beacon's block entity is filed under.

***

### BEACON\_DATA\_LEVELS

> `const` **BEACON\_DATA\_LEVELS**: `0` = `0`

Defined in: [packages/prismarine/src/world/beacon.ts:44](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L44)

The beacon menu's data slot for the pyramid's levels.

***

### BEACON\_DATA\_PRIMARY

> `const` **BEACON\_DATA\_PRIMARY**: `1` = `1`

Defined in: [packages/prismarine/src/world/beacon.ts:46](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L46)

The beacon menu's data slot for the primary effect.

***

### BEACON\_DATA\_SECONDARY

> `const` **BEACON\_DATA\_SECONDARY**: `2` = `2`

Defined in: [packages/prismarine/src/world/beacon.ts:48](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L48)

The beacon menu's data slot for the secondary effect.

***

### BEACON\_INTERVAL

> `const` **BEACON\_INTERVAL**: `80` = `80`

Defined in: [packages/prismarine/src/world/beacon.ts:34](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L34)

A beacon applies its effects on every game tick that is a multiple of this.

***

### BEACON\_PAYMENT\_ITEMS

> `const` **BEACON\_PAYMENT\_ITEMS**: `"minecraft:beacon_payment_items"` = `'minecraft:beacon_payment_items'`

Defined in: [packages/prismarine/src/world/beacon.ts:31](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L31)

The items a beacon takes as payment for a choice of effects.

## Functions

### beaconBeamClear()

> **beaconBeamClear**(`blocks`, `at`): `boolean`

Defined in: [packages/prismarine/src/world/beacon.ts:161](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L161)

Whether a beacon's beam reaches the sky: no block above it stops light, bedrock aside. A tinted
block such as stained glass lets it through, as it does every block that does not stop light.

#### Parameters

##### blocks

[`BeaconBlocks`](#beaconblocks)

##### at

`BlockXYZ`

#### Returns

`boolean`

#### Java See

BeaconBlockEntity.tick

***

### beaconBlocksIn()

> **beaconBlocksIn**(`world`): [`BeaconBlocks`](#beaconblocks)

Defined in: [packages/prismarine/src/world/beacon.ts:305](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L305)

The blocks above a beacon in a world.

#### Parameters

##### world

[`BeaconWorld`](#beaconworld)

#### Returns

[`BeaconBlocks`](#beaconblocks)

***

### beaconBlocksOf()

> **beaconBlocksOf**(`blockAt`, `maxY`): [`BeaconBlocks`](#beaconblocks)

Defined in: [packages/prismarine/src/world/beacon.ts:99](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L99)

The blocks above a beacon, as a world's loaded blocks give them.

#### Parameters

##### blockAt

(`x`, `y`, `z`) => `BeaconBlock` \| `undefined`

The loaded block at a position, or undefined when its chunk is not loaded.

##### maxY

`number`

The dimension's highest block y.

#### Returns

[`BeaconBlocks`](#beaconblocks)

***

### beaconChoiceRefusal()

> **beaconChoiceRefusal**(`payment`, `choice`, `levels`): `string` \| `undefined`

Defined in: [packages/prismarine/src/world/beacon.ts:283](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L283)

Why a beacon refuses a choice of effects paid for with a stack, or undefined when it takes it:
the payment slot holds a payment item and the pyramid offers the choice.

#### Parameters

##### payment

`BeaconPayment` \| `null`

What the payment slot holds.

##### choice

[`BeaconEffects`](#beaconeffects)

The effects chosen.

##### levels

`number`

The pyramid's levels.

#### Returns

`string` \| `undefined`

#### Java See

BeaconMenu.updateEffects

#### Java See

BeaconMenu$PaymentSlot.mayPlace

***

### beaconEffectId()

> **beaconEffectId**(`effect`): `number`

Defined in: [packages/prismarine/src/world/beacon.ts:237](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L237)

A beacon's chosen effect as a Bedrock effect id, the way the block entity keeps it and the menu's
data slots carry it: 0 for none.

#### Parameters

##### effect

`string` \| `null`

#### Returns

`number`

***

### beaconEffectOfId()

> **beaconEffectOfId**(`id`): `string` \| `null` \| `undefined`

Defined in: [packages/prismarine/src/world/beacon.ts:244](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L244)

The effect a Bedrock effect id names, for a choice off the wire.

#### Parameters

##### id

`number`

#### Returns

`string` \| `null` \| `undefined`

Null for 0, or undefined for an id no effect has.

***

### beaconEffectsOf()

> **beaconEffectsOf**(`tags`): [`BeaconEffects`](#beaconeffects)

Defined in: [packages/prismarine/src/world/beacon.ts:228](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L228)

The effects a beacon's block entity keeps. An effect no layer offers reads as none, as vanilla
filters one it loads.

#### Parameters

##### tags

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `undefined`

The block entity, or undefined for a beacon that has none yet.

#### Returns

[`BeaconEffects`](#beaconeffects)

#### Java See

BeaconBlockEntity.filterEffect

***

### beaconLevelsIn()

> **beaconLevelsIn**(`blocks`, `world`, `at`): `number`

Defined in: [packages/prismarine/src/world/beacon.ts:127](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L127)

How many full layers of base blocks stand under the beacon at a position, up to four.

#### Parameters

##### blocks

`PyramidWorld`

The content's block world.

##### world

`NamedWorld`

The world the beacon stands in.

##### at

`BlockXYZ`

The beacon.

#### Returns

`number`

***

### beaconPowers()

> **beaconPowers**(`levels`, `__namedParameters`): [`BeaconPowers`](#beaconpowers) \| `undefined`

Defined in: [packages/prismarine/src/world/beacon.ts:187](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L187)

What a beacon with this pyramid and choice gives, or undefined when it has no primary effect.
The primary is amplified on a full pyramid whose secondary is the primary again; any other
secondary is given beside it on a full pyramid.

#### Parameters

##### levels

`number`

##### \_\_namedParameters

[`BeaconEffects`](#beaconeffects)

#### Returns

[`BeaconPowers`](#beaconpowers) \| `undefined`

#### Java Source

BeaconBlockEntity.applyEffects

***

### beaconReaches()

> **beaconReaches**(`at`, `range`, `height`, `feet`): `boolean`

Defined in: [packages/prismarine/src/world/beacon.ts:208](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L208)

Whether a player standing at a position is in a beacon's reach: the beacon's block grown by the
range on every side, then up by the dimension's height.

#### Parameters

##### at

`BlockXYZ`

The beacon.

##### range

`number`

Its range.

##### height

`number`

The dimension's height in blocks.

##### feet

`BlockXYZ`

Where the player's feet are.

#### Returns

`boolean`

#### Java See

BeaconBlockEntity.applyEffects

***

### beaconScreenData()

> **beaconScreenData**(`levels`, `__namedParameters`): `ReadonlyMap`\<`number`, `number`\>

Defined in: [packages/prismarine/src/world/beacon.ts:261](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L261)

The beacon menu's data slots: the pyramid's levels, then each effect as a Bedrock effect id or 0.

#### Parameters

##### levels

`number`

##### \_\_namedParameters

[`BeaconEffects`](#beaconeffects)

#### Returns

`ReadonlyMap`\<`number`, `number`\>

#### Java See

BeaconBlockEntity$1.get

***

### beaconScreenDataAt()

> **beaconScreenDataAt**(`world`, `levels`, `at`): `ReadonlyMap`\<`number`, `number`\>

Defined in: [packages/prismarine/src/world/beacon.ts:321](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L321)

What the screen of the beacon at a position shows: the pyramid's levels and its effects.

#### Parameters

##### world

`BlockEntityWorld`

The world it stands in.

##### levels

`number`

The pyramid's levels.

##### at

`BlockXYZ`

The beacon.

#### Returns

`ReadonlyMap`\<`number`, `number`\>

***

### beaconTagsAt()

> **beaconTagsAt**(`world`, `at`): [`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `undefined`

Defined in: [packages/prismarine/src/world/beacon.ts:309](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L309)

The block entity of the beacon at a position, or undefined when it has none or is not loaded.

#### Parameters

##### world

`BlockEntityWorld`

##### at

`BlockXYZ`

#### Returns

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `undefined`

***

### pulseBeacon()

> **pulseBeacon**(`blocks`, `levels`, `at`, `tags`, `height`, `players`): [`BeaconPulse`](#beaconpulse)

Defined in: [packages/prismarine/src/world/beacon.ts:370](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L370)

One beacon's pulse, which comes every [BEACON\_INTERVAL](#beacon-interval) ticks: an active beacon gives its
effects to each player in its reach, as ambient effects that show their particles and their
icon.

#### Parameters

##### blocks

[`BeaconBlocks`](#beaconblocks)

The blocks above it.

##### levels

`number`

Its pyramid's levels.

##### at

`BlockXYZ`

The beacon.

##### tags

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `undefined`

Its block entity.

##### height

`number`

The dimension's height in blocks.

##### players

readonly [`BeaconPlayer`](#beaconplayer)[]

The players in its world.

#### Returns

[`BeaconPulse`](#beaconpulse)

#### Java See

BeaconBlockEntity.tick

#### Java See

BeaconBlockEntity.applyEffects

***

### storeBeaconEffects()

> **storeBeaconEffects**(`world`, `at`, `choice`): `void`

Defined in: [packages/prismarine/src/world/beacon.ts:335](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L335)

Keeps a paid-for choice of effects on the beacon at a position, which tells the players who see
the block, and plays the beacon's sound for it while its beam reaches the sky.

#### Parameters

##### world

[`BeaconWorld`](#beaconworld)

The world it stands in.

##### at

`BlockXYZ`

The beacon.

##### choice

[`BeaconEffects`](#beaconeffects)

The effects chosen.

#### Returns

`void`

#### Java See

BeaconBlockEntity$1.set

***

### validBeaconEffects()

> **validBeaconEffects**(`__namedParameters`, `levels`): `boolean`

Defined in: [packages/prismarine/src/world/beacon.ts:147](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L147)

Whether a pyramid of `levels` layers offers this choice: each effect from a layer the pyramid
has, a primary from below the top layer, and a secondary only on a full pyramid, where it is
regeneration or the primary again.

#### Parameters

##### \_\_namedParameters

[`BeaconEffects`](#beaconeffects)

##### levels

`number`

#### Returns

`boolean`

#### Java Source

BeaconBlockEntity.validateEffects

***

### withBeaconEffects()

> **withBeaconEffects**(`tags`, `__namedParameters`): [`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md)

Defined in: [packages/prismarine/src/world/beacon.ts:251](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/beacon.ts#L251)

Writes a choice of effects into a beacon's block entity.

#### Parameters

##### tags

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md)

##### \_\_namedParameters

[`BeaconEffects`](#beaconeffects)

#### Returns

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md)

The same compound.
