Interface Beacon
-
- All Superinterfaces:
BlockEntity
,CopyableDataHolder
,DataHolder
,DataHolder.Mutable
,DataSerializable
,Locatable
,NameableBlockEntity
,SerializableDataHolder
,SerializableDataHolder.Mutable
,ValueContainer
public interface Beacon extends NameableBlockEntity
Represents a Beacon.Beacons apply prescribed effects according to the
Keys.PRIMARY_POTION_EFFECT_TYPE
. Depending on the completed levels of the beacon, the effects may be applied at a further range or shorter range.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolder
DataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
-
Nested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolder
SerializableDataHolder.Immutable<I extends SerializableDataHolder.Immutable<I>>, SerializableDataHolder.Mutable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description int
completedLevels()
Gets the number of completed levels of valid beacon structure blocks beneath this beacon.default java.util.Optional<Value.Mutable<PotionEffectType>>
primaryEffect()
Gets theValue.Mutable
for the primaryPotionEffectType
.default java.util.Optional<Value.Mutable<PotionEffectType>>
secondaryEffect()
Gets theValue.Mutable
for the secondaryPotionEffectType
.-
Methods inherited from interface org.spongepowered.api.block.entity.BlockEntity
block, copy, createArchetype, isValid, locatableBlock, mirror, mirror, rotate, rotate, setValid, type
-
Methods inherited from interface org.spongepowered.api.data.DataHolder.Mutable
copyFrom, copyFrom, offer, offer, offer, offer, offerAll, offerAll, offerAll, offerAll, offerAll, offerAll, offerSingle, offerSingle, offerSingle, offerSingle, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeKey, removeKey, removeSingle, removeSingle, transform, transform, tryOffer, tryOffer, tryOffer, undo
-
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
Methods inherited from interface org.spongepowered.api.world.Locatable
blockPosition, location, serverLocation, world
-
Methods inherited from interface org.spongepowered.api.block.entity.NameableBlockEntity
displayName
-
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder
validateRawData
-
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Mutable
setRawData
-
-
-
-
Method Detail
-
completedLevels
int completedLevels()
Gets the number of completed levels of valid beacon structure blocks beneath this beacon.- Returns:
- The number of levels
-
primaryEffect
default java.util.Optional<Value.Mutable<PotionEffectType>> primaryEffect()
Gets theValue.Mutable
for the primaryPotionEffectType
.- Returns:
- The optional value for the primary potion effect
-
secondaryEffect
default java.util.Optional<Value.Mutable<PotionEffectType>> secondaryEffect()
Gets theValue.Mutable
for the secondaryPotionEffectType
.- Returns:
- The optional value for the secondary potion effect
-
-