public class BreakableValueProcessor extends AbstractSpongeValueProcessor<net.minecraft.item.ItemStack,Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>>
Constructor and Description |
---|
BreakableValueProcessor() |
Modifier and Type | Method and Description |
---|---|
org.spongepowered.api.data.value.immutable.ImmutableSetValue<org.spongepowered.api.block.BlockType> |
constructImmutableValue(Set<org.spongepowered.api.block.BlockType> defaultValue) |
org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType> |
constructValue(Set<org.spongepowered.api.block.BlockType> defaultValue)
Builds a
Value of the type produced by this processor from an
input, actual value. |
Optional<Set<org.spongepowered.api.block.BlockType>> |
getVal(net.minecraft.item.ItemStack stack) |
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 . |
boolean |
set(net.minecraft.item.ItemStack stack,
Set<org.spongepowered.api.block.BlockType> value) |
getApiValueFromContainer, getKey, getPriority, getValueFromContainer, offerToStore, supports, supports
public org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType> constructValue(Set<org.spongepowered.api.block.BlockType> defaultValue)
AbstractSpongeValueProcessor
Value
of the type produced by this processor from an
input, actual value.constructValue
in class AbstractSpongeValueProcessor<net.minecraft.item.ItemStack,Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>>
defaultValue
- The actual valueValue
public org.spongepowered.api.data.value.immutable.ImmutableSetValue<org.spongepowered.api.block.BlockType> constructImmutableValue(Set<org.spongepowered.api.block.BlockType> defaultValue)
constructImmutableValue
in class AbstractSpongeValueProcessor<net.minecraft.item.ItemStack,Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>>
public Optional<Set<org.spongepowered.api.block.BlockType>> getVal(net.minecraft.item.ItemStack stack)
getVal
in class AbstractSpongeValueProcessor<net.minecraft.item.ItemStack,Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>>
public boolean set(net.minecraft.item.ItemStack stack, Set<org.spongepowered.api.block.BlockType> value)
set
in class AbstractSpongeValueProcessor<net.minecraft.item.ItemStack,Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>>
public 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 from