public interface IMixinBlock
Block
such that their
acceptable BlockState
s can be created, manipulated, and applied
with the safety of using these instance checks of the IMixinBlock
.
The advantage of this is that a simple cast from Block
to a
particular IMixinBlock
to take advantage of particular Value
types, such as IMixinBlockDirectional
, are really simple to perform.
It is important to note that when using this level of implementation,
it is already guaranteed that a particular IMixinBlock
is capable
of a particular type thanks to Mixin
s. All that is needed to handle
a particular type of Value
or ImmutableDataManipulator
is a
simple cast. This is particularly useful for BlockDataProcessor
s as
they already know the type they need to focus on.
Modifier and Type | Method and Description |
---|---|
List<org.spongepowered.api.data.key.Key<?>> |
getApplicableKeys()
Gets the list of applicable keys.
|
org.spongepowered.api.block.BlockState |
getDefaultBlockState()
Gets the default
BlockState as an api representation. |
List<org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> |
getManipulators(net.minecraft.block.state.IBlockState blockState)
Gets all the
ImmutableDataManipulator s for the provided
IBlockState . |
List<org.spongepowered.api.data.value.immutable.ImmutableValue<?>> |
getValues(net.minecraft.block.state.IBlockState blockState) |
boolean |
isFlammable(net.minecraft.world.IBlockAccess blockAccess,
net.minecraft.util.BlockPos pos,
net.minecraft.util.EnumFacing facing) |
boolean |
supports(Class<? extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> immutable) |
List<org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> getManipulators(net.minecraft.block.state.IBlockState blockState)
ImmutableDataManipulator
s for the provided
IBlockState
.blockState
- The block state being passed inboolean supports(Class<? extends org.spongepowered.api.data.manipulator.ImmutableDataManipulator<?,?>> immutable)
List<org.spongepowered.api.data.key.Key<?>> getApplicableKeys()
List<org.spongepowered.api.data.value.immutable.ImmutableValue<?>> getValues(net.minecraft.block.state.IBlockState blockState)
org.spongepowered.api.block.BlockState getDefaultBlockState()
BlockState
as an api representation.boolean isFlammable(net.minecraft.world.IBlockAccess blockAccess, net.minecraft.util.BlockPos pos, net.minecraft.util.EnumFacing facing)