public class BreakableDataProcessor extends AbstractItemSingleDataProcessor<Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.manipulator.mutable.item.BreakableData,org.spongepowered.api.data.manipulator.immutable.item.ImmutableBreakableData>
key
Constructor and Description |
---|
BreakableDataProcessor() |
Modifier and Type | Method and Description |
---|---|
protected org.spongepowered.api.data.value.immutable.ImmutableValue<Set<org.spongepowered.api.block.BlockType>> |
constructImmutableValue(Set<org.spongepowered.api.block.BlockType> value) |
protected org.spongepowered.api.data.manipulator.mutable.item.BreakableData |
createManipulator() |
protected Optional<Set<org.spongepowered.api.block.BlockType>> |
getVal(net.minecraft.item.ItemStack itemStack) |
org.spongepowered.api.data.DataTransactionResult |
remove(org.spongepowered.api.data.DataHolder dataHolder)
Attempts to remove the
DataManipulator type from the given DataHolder . |
protected boolean |
set(net.minecraft.item.ItemStack itemStack,
Set<org.spongepowered.api.block.BlockType> value) |
fill, from, set, supports, with
createFrom, fill
getPriority, supports
protected org.spongepowered.api.data.manipulator.mutable.item.BreakableData createManipulator()
createManipulator
in class AbstractSingleDataProcessor<Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.manipulator.mutable.item.BreakableData,org.spongepowered.api.data.manipulator.immutable.item.ImmutableBreakableData>
protected Optional<Set<org.spongepowered.api.block.BlockType>> getVal(net.minecraft.item.ItemStack itemStack)
getVal
in class AbstractItemSingleDataProcessor<Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.manipulator.mutable.item.BreakableData,org.spongepowered.api.data.manipulator.immutable.item.ImmutableBreakableData>
protected boolean set(net.minecraft.item.ItemStack itemStack, Set<org.spongepowered.api.block.BlockType> value)
set
in class AbstractItemSingleDataProcessor<Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.manipulator.mutable.item.BreakableData,org.spongepowered.api.data.manipulator.immutable.item.ImmutableBreakableData>
public org.spongepowered.api.data.DataTransactionResult remove(org.spongepowered.api.data.DataHolder dataHolder)
DataProcessor
DataManipulator
type from the given DataHolder
.
If the DataHolder
can not support removing the data outright,
false
should be returned.
dataHolder
- The data holder to remove the data fromprotected org.spongepowered.api.data.value.immutable.ImmutableValue<Set<org.spongepowered.api.block.BlockType>> constructImmutableValue(Set<org.spongepowered.api.block.BlockType> value)
constructImmutableValue
in class AbstractItemSingleDataProcessor<Set<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.value.mutable.SetValue<org.spongepowered.api.block.BlockType>,org.spongepowered.api.data.manipulator.mutable.item.BreakableData,org.spongepowered.api.data.manipulator.immutable.item.ImmutableBreakableData>