public interface Beacon extends Container, Nameable
| Modifier and Type | Method and Description |
|---|---|
Collection<LivingEntity> |
getEntitiesInRange()
Returns the list of players within the beacon's range of effect.
|
BeaconInventory |
getInventory()
Gets the inventory of the block represented by this block state.
|
PotionEffect |
getPrimaryEffect()
Returns the primary effect set on the beacon
|
PotionEffect |
getSecondaryEffect()
Returns the secondary effect set on the beacon.
|
BeaconInventory |
getSnapshotInventory()
Gets the captured inventory snapshot of this container.
|
int |
getTier()
Returns the tier of the beacon pyramid (0-4).
|
void |
setPrimaryEffect(PotionEffectType effect)
Set the primary effect on this beacon, or null to clear.
|
void |
setSecondaryEffect(PotionEffectType effect)
Set the secondary effect on this beacon, or null to clear.
|
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, updategetMetadata, hasMetadata, removeMetadata, setMetadatagetCustomName, setCustomNameBeaconInventory getInventory()
ContainerIf the block was changed to a different type in the meantime, the returned inventory might no longer be valid.
If this block state is not placed this will return the captured inventory snapshot instead.
getInventory in interface ContainergetInventory in interface InventoryHolderBeaconInventory getSnapshotInventory()
Container
The returned inventory is not linked to any block. Any modifications to
the returned inventory will not be applied to the block represented by
this block state up until BlockState.update(boolean, boolean) has been
called.
getSnapshotInventory in interface ContainerCollection<LivingEntity> getEntitiesInRange()
This will return an empty list if the block represented by this state is no longer a beacon.
IllegalStateException - if this block state is not placedint getTier()
PotionEffect getPrimaryEffect()
void setPrimaryEffect(PotionEffectType effect)
effect - new primary effectPotionEffect getSecondaryEffect()
void setSecondaryEffect(PotionEffectType effect)
effect - desired secondary effectCopyright © 2017. All rights reserved.