SidedBlock
instead, ignoring the side argument if
the side doesn't matter.@Deprecated
public interface Block
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.Modifier and Type | Method and Description |
---|---|
ManagedEnvironment |
createEnvironment(net.minecraft.world.World world,
int x,
int y,
int z)
Deprecated.
Create a new managed environment interfacing the specified block.
|
boolean |
worksWith(net.minecraft.world.World world,
int x,
int y,
int z)
Deprecated.
Used to determine the block types this driver handles.
|
boolean worksWith(net.minecraft.world.World world, int x, int y, int z)
world
- the world in which the block to check lives.x
- the X coordinate of the block to check.y
- the Y coordinate of the block to check.z
- the Z coordinate of the block to check.ManagedEnvironment createEnvironment(net.minecraft.world.World world, int x, int y, int z)
world
- the world containing the block to get the environment for.x
- the X coordinate of the block to get the environment for.y
- the Y coordinate of the block to get the environment for.z
- the Z coordinate of the block to get the environment for.