public interface SidedBlock
TileEntity implement one of the interfaces
for environments (Environment or
SidedEnvironment).
A block driver is used by Adapter blocks to check its neighbors and
whether those neighbors should be treated as components or not. If a driver
is present, it will be used to create a ManagedEnvironment that is
managed by the adapter.
Note that it is possible to write one driver that supports as many different
blocks as you wish. I'd recommend writing one per device (type), though, to
keep things modular.
Note that side-aware block drivers are queried before regular block drivers,
because they are more specific.| Modifier and Type | Method and Description |
|---|---|
ManagedEnvironment |
createEnvironment(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumFacing side)
Create a new managed environment interfacing the specified block.
|
boolean |
worksWith(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumFacing side)
Used to determine the block types this driver handles.
|
boolean worksWith(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumFacing side)
world - the world in which the block to check lives.pos - the position coordinate of the block to check.side - the side of the block to check.ManagedEnvironment createEnvironment(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.EnumFacing side)
world - the world containing the block to get the environment for.pos - the position coordinate of the block to check.side - the side of the block to check.