public class ExperienceFromStartOfLevelValueProcessor extends AbstractSpongeValueProcessor<net.minecraft.entity.player.EntityPlayer,Integer,org.spongepowered.api.data.value.immutable.ImmutableBoundedValue<Integer>>
Constructor and Description |
---|
ExperienceFromStartOfLevelValueProcessor() |
Modifier and Type | Method and Description |
---|---|
protected org.spongepowered.api.data.value.immutable.ImmutableValue<Integer> |
constructImmutableValue(Integer value) |
org.spongepowered.api.data.value.immutable.ImmutableBoundedValue<Integer> |
constructValue(Integer defaultValue)
Builds a
Value of the type produced by this processor from an
input, actual value. |
protected Optional<Integer> |
getVal(net.minecraft.entity.player.EntityPlayer container) |
org.spongepowered.api.data.DataTransactionResult |
offerToStore(org.spongepowered.api.data.value.ValueContainer<?> container,
Integer value)
Offers the provided
BaseValue containing a value of the
appropriate value type of this ValueProcessor to offer
back to the ValueContainer . |
org.spongepowered.api.data.DataTransactionResult |
removeFrom(org.spongepowered.api.data.value.ValueContainer<?> container)
Attempts to remove the known keyed data associated with this
ValueProcessor from the provided ValueContainer . |
protected boolean |
set(net.minecraft.entity.player.EntityPlayer container,
Integer value) |
getApiValueFromContainer, getKey, getPriority, getValueFromContainer, supports, supports
public ExperienceFromStartOfLevelValueProcessor()
public org.spongepowered.api.data.DataTransactionResult offerToStore(org.spongepowered.api.data.value.ValueContainer<?> container, Integer value)
ValueProcessor
BaseValue
containing a value of the
appropriate value type of this ValueProcessor
to offer
back to the ValueContainer
.offerToStore
in interface ValueProcessor<Integer,org.spongepowered.api.data.value.immutable.ImmutableBoundedValue<Integer>>
offerToStore
in class AbstractSpongeValueProcessor<net.minecraft.entity.player.EntityPlayer,Integer,org.spongepowered.api.data.value.immutable.ImmutableBoundedValue<Integer>>
container
- The value containervalue
- The valuepublic org.spongepowered.api.data.DataTransactionResult removeFrom(org.spongepowered.api.data.value.ValueContainer<?> container)
ValueProcessor
ValueProcessor
from the provided ValueContainer
. If
the result is not possible, the result will be an expected
DataTransactionResult.Type#FAILURE
.container
- The value container to remove data frompublic org.spongepowered.api.data.value.immutable.ImmutableBoundedValue<Integer> constructValue(Integer defaultValue)
AbstractSpongeValueProcessor
Value
of the type produced by this processor from an
input, actual value.constructValue
in class AbstractSpongeValueProcessor<net.minecraft.entity.player.EntityPlayer,Integer,org.spongepowered.api.data.value.immutable.ImmutableBoundedValue<Integer>>
defaultValue
- The actual valueValue
protected boolean set(net.minecraft.entity.player.EntityPlayer container, Integer value)
set
in class AbstractSpongeValueProcessor<net.minecraft.entity.player.EntityPlayer,Integer,org.spongepowered.api.data.value.immutable.ImmutableBoundedValue<Integer>>
protected Optional<Integer> getVal(net.minecraft.entity.player.EntityPlayer container)
getVal
in class AbstractSpongeValueProcessor<net.minecraft.entity.player.EntityPlayer,Integer,org.spongepowered.api.data.value.immutable.ImmutableBoundedValue<Integer>>
protected org.spongepowered.api.data.value.immutable.ImmutableValue<Integer> constructImmutableValue(Integer value)
constructImmutableValue
in class AbstractSpongeValueProcessor<net.minecraft.entity.player.EntityPlayer,Integer,org.spongepowered.api.data.value.immutable.ImmutableBoundedValue<Integer>>