public class RepresentedItemValueProcessor extends AbstractSpongeValueProcessor<net.minecraft.entity.Entity,org.spongepowered.api.item.inventory.ItemStackSnapshot,org.spongepowered.api.data.value.mutable.Value<org.spongepowered.api.item.inventory.ItemStackSnapshot>>
Constructor and Description |
---|
RepresentedItemValueProcessor() |
Modifier and Type | Method and Description |
---|---|
protected org.spongepowered.api.data.value.immutable.ImmutableValue<org.spongepowered.api.item.inventory.ItemStackSnapshot> |
constructImmutableValue(org.spongepowered.api.item.inventory.ItemStackSnapshot value) |
protected org.spongepowered.api.data.value.mutable.Value<org.spongepowered.api.item.inventory.ItemStackSnapshot> |
constructValue(org.spongepowered.api.item.inventory.ItemStackSnapshot defaultValue)
Builds a
Value of the type produced by this processor from an
input, actual value. |
protected Optional<org.spongepowered.api.item.inventory.ItemStackSnapshot> |
getVal(net.minecraft.entity.Entity container) |
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.Entity container,
org.spongepowered.api.item.inventory.ItemStackSnapshot value) |
boolean |
supports(org.spongepowered.api.data.value.ValueContainer<?> container)
Checks if the provided
ValueContainer is compatible with the
value of data associated with this ValueProcessor . |
getApiValueFromContainer, getKey, getPriority, getValueFromContainer, offerToStore, supports
protected org.spongepowered.api.data.value.mutable.Value<org.spongepowered.api.item.inventory.ItemStackSnapshot> constructValue(org.spongepowered.api.item.inventory.ItemStackSnapshot defaultValue)
AbstractSpongeValueProcessor
Value
of the type produced by this processor from an
input, actual value.constructValue
in class AbstractSpongeValueProcessor<net.minecraft.entity.Entity,org.spongepowered.api.item.inventory.ItemStackSnapshot,org.spongepowered.api.data.value.mutable.Value<org.spongepowered.api.item.inventory.ItemStackSnapshot>>
defaultValue
- The actual valueValue
protected boolean set(net.minecraft.entity.Entity container, org.spongepowered.api.item.inventory.ItemStackSnapshot value)
set
in class AbstractSpongeValueProcessor<net.minecraft.entity.Entity,org.spongepowered.api.item.inventory.ItemStackSnapshot,org.spongepowered.api.data.value.mutable.Value<org.spongepowered.api.item.inventory.ItemStackSnapshot>>
protected Optional<org.spongepowered.api.item.inventory.ItemStackSnapshot> getVal(net.minecraft.entity.Entity container)
getVal
in class AbstractSpongeValueProcessor<net.minecraft.entity.Entity,org.spongepowered.api.item.inventory.ItemStackSnapshot,org.spongepowered.api.data.value.mutable.Value<org.spongepowered.api.item.inventory.ItemStackSnapshot>>
protected org.spongepowered.api.data.value.immutable.ImmutableValue<org.spongepowered.api.item.inventory.ItemStackSnapshot> constructImmutableValue(org.spongepowered.api.item.inventory.ItemStackSnapshot value)
constructImmutableValue
in class AbstractSpongeValueProcessor<net.minecraft.entity.Entity,org.spongepowered.api.item.inventory.ItemStackSnapshot,org.spongepowered.api.data.value.mutable.Value<org.spongepowered.api.item.inventory.ItemStackSnapshot>>
public boolean supports(org.spongepowered.api.data.value.ValueContainer<?> container)
ValueProcessor
ValueContainer
is compatible with the
value of data associated with this ValueProcessor
.supports
in interface ValueProcessor<org.spongepowered.api.item.inventory.ItemStackSnapshot,org.spongepowered.api.data.value.mutable.Value<org.spongepowered.api.item.inventory.ItemStackSnapshot>>
supports
in class AbstractSpongeValueProcessor<net.minecraft.entity.Entity,org.spongepowered.api.item.inventory.ItemStackSnapshot,org.spongepowered.api.data.value.mutable.Value<org.spongepowered.api.item.inventory.ItemStackSnapshot>>
container
- The value container to checkpublic 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