public abstract class MixinBlockStandingSign extends MixinBlock
Constructor and Description |
---|
MixinBlockStandingSign() |
Modifier and Type | Method and Description |
---|---|
org.spongepowered.api.data.manipulator.immutable.block.ImmutableDirectionalData |
getDirectionalData(net.minecraft.block.state.IBlockState blockState) |
ImmutableList<org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> |
getManipulators(net.minecraft.block.state.IBlockState blockState)
Gets all the
ImmutableDataManipulator s for the provided
IBlockState . |
Optional<org.spongepowered.api.block.BlockState> |
getStateWithData(net.minecraft.block.state.IBlockState blockState,
org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?> manipulator)
Again, another delegate method directly to the block, usually not all
required, but it does help if the block does support the manipulator
in the first place.
|
<E> Optional<org.spongepowered.api.block.BlockState> |
getStateWithValue(net.minecraft.block.state.IBlockState blockState,
org.spongepowered.api.data.key.Key<? extends org.spongepowered.api.data.value.BaseValue<E>> key,
E value)
Instead of delegating to a block processor, we can delegate to the block
to retrieve the correct
BlockState if supported. |
boolean |
supports(Class<? extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> immutable)
A simple check whether the class is supported by the block or not.
|
callRandomTickEvent, getDefaultBlockState, getDefaultState, getEnableStats, getId, getItem, getLightValue, getMaterial, getName, getStateFromMeta, getTickRandomly, getTrait, getTraits, getTranslation, getUnlocalizedName, isBlockNormalCube, onDropBlockAsItemWithChance, setTickRandomly, shadow$getDefaultState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getApplicableProperties, getProperty
isFlammable
public org.spongepowered.api.data.manipulator.immutable.block.ImmutableDirectionalData getDirectionalData(net.minecraft.block.state.IBlockState blockState)
public boolean supports(Class<? extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> immutable)
IMixinBlock
supports
in interface IMixinBlock
supports
in class MixinBlock
immutable
- The immutable classpublic Optional<org.spongepowered.api.block.BlockState> getStateWithData(net.minecraft.block.state.IBlockState blockState, org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?> manipulator)
IMixinBlock
getStateWithData
in interface IMixinBlock
getStateWithData
in class MixinBlock
blockState
- The block state to base off ofmanipulator
- The manipulator being offeredpublic <E> Optional<org.spongepowered.api.block.BlockState> getStateWithValue(net.minecraft.block.state.IBlockState blockState, org.spongepowered.api.data.key.Key<? extends org.spongepowered.api.data.value.BaseValue<E>> key, E value)
IMixinBlock
BlockState
if supported. Considering
block processors would require to know of the blocks themselves, it is
easier to use the block to understand what data is being offered,
and the current block state being used. Since all of the data is already
relatively kept in the block state instance, it is therefor very well
possible to cycle according to the block instance.getStateWithValue
in interface IMixinBlock
getStateWithValue
in class MixinBlock
E
- The type of value, for type checkingblockState
- The block state to use as a basekey
- The key to the datavalue
- The valuepublic ImmutableList<org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> getManipulators(net.minecraft.block.state.IBlockState blockState)
IMixinBlock
ImmutableDataManipulator
s for the provided
IBlockState
.getManipulators
in interface IMixinBlock
getManipulators
in class MixinBlock
blockState
- The block state being passed in