public interface InteractableVolume extends MutableBlockVolume
Modifier and Type | Method and Description |
---|---|
boolean |
digBlock(int x,
int y,
int z,
GameProfile profile)
Simulate the digging of the block as if a player had done so.
|
default boolean |
digBlock(com.flowpowered.math.vector.Vector3i position,
GameProfile profile)
Simulate the digging of the block as if a player had done so.
|
boolean |
digBlockWith(int x,
int y,
int z,
ItemStack itemStack,
GameProfile profile)
Simulate the digging of the block with the given tool as if a player had
done so.
|
default boolean |
digBlockWith(com.flowpowered.math.vector.Vector3i position,
ItemStack itemStack,
GameProfile profile)
Simulate the digging of the block with the given tool as if a player had
done so.
|
int |
getBlockDigTimeWith(int x,
int y,
int z,
ItemStack itemStack,
GameProfile profile)
Gets the time it takes to dig this block with the specified item in
ticks.
|
default int |
getBlockDigTimeWith(com.flowpowered.math.vector.Vector3i position,
ItemStack itemStack,
GameProfile profile)
Gets the time it takes to dig this block with the specified item in
ticks.
|
MutableBlockVolumeWorker<? extends InteractableVolume> |
getBlockWorker()
Gets a new block worker for this block volume.
|
boolean |
hitBlock(int x,
int y,
int z,
Direction side,
GameProfile profile)
Simulates hitting a block as if a player had done so.
|
default boolean |
hitBlock(com.flowpowered.math.vector.Vector3i position,
Direction side,
GameProfile profile)
Simulates hitting a block as if a player had done so.
|
boolean |
interactBlock(int x,
int y,
int z,
Direction side,
GameProfile profile)
Simulates the interaction the block as if a player had done so.
|
default boolean |
interactBlock(com.flowpowered.math.vector.Vector3i position,
Direction side,
GameProfile profile)
Simulates the interaction the block as if a player had done so.
|
boolean |
interactBlockWith(int x,
int y,
int z,
ItemStack itemStack,
Direction side,
GameProfile profile)
Simulates the interaction the block using the given item as if the player
had done so.
|
default boolean |
interactBlockWith(com.flowpowered.math.vector.Vector3i position,
ItemStack itemStack,
Direction side,
GameProfile profile)
Simulates the interaction the block using the given item as if the player
had done so.
|
boolean |
placeBlock(int x,
int y,
int z,
BlockState block,
Direction side,
GameProfile profile)
Simulates the placement of a block at the given location as if a player
had done so.
|
default boolean |
placeBlock(com.flowpowered.math.vector.Vector3i position,
BlockState block,
Direction side,
GameProfile profile)
Simulates the placement of a block at the given location as if a player
had done so.
|
getBlockView, getBlockView, getRelativeBlockView, setBlock, setBlock, setBlockType, setBlockType
containsBlock, containsBlock, getBlock, getBlock, getBlockCopy, getBlockCopy, getBlockMax, getBlockMin, getBlockSize, getBlockType, getBlockType, getImmutableBlockCopy, getUnmodifiableBlockView
default boolean hitBlock(com.flowpowered.math.vector.Vector3i position, Direction side, GameProfile profile)
The difference between this and digBlock(com.flowpowered.math.vector.Vector3i, org.spongepowered.api.profile.GameProfile)
is that this will
only do a single instantaneous "click" whereas digBlock will simulate
holding the primary mouse button until the block breaks.
position
- The position of the blockside
- The side of the block to interact withprofile
- The game profile of the player this is imitatingboolean hitBlock(int x, int y, int z, Direction side, GameProfile profile)
The difference between this and digBlock(com.flowpowered.math.vector.Vector3i, org.spongepowered.api.profile.GameProfile)
is that this will
only do a single instantaneous "click" whereas digBlock will simulate
holding the primary mouse button until the block breaks.
x
- The X positiony
- The Y positionz
- The Z positionside
- The side of the block to interact withprofile
- The game profile of the player this is imitatingdefault boolean interactBlock(com.flowpowered.math.vector.Vector3i position, Direction side, GameProfile profile)
position
- The position of the blockside
- The side of the block to interact withprofile
- The game profile of the player this is imitatingboolean interactBlock(int x, int y, int z, Direction side, GameProfile profile)
x
- The X positiony
- The Y positionz
- The Z positionside
- The side of the block to interact withprofile
- The game profile of the player this is imitatingdefault boolean interactBlockWith(com.flowpowered.math.vector.Vector3i position, ItemStack itemStack, Direction side, GameProfile profile)
position
- The position of the blockitemStack
- The itemside
- The side of the block to interact withprofile
- The game profile of the player this is imitatingboolean interactBlockWith(int x, int y, int z, ItemStack itemStack, Direction side, GameProfile profile)
x
- The X positiony
- The Y positionz
- The Z positionitemStack
- The itemside
- The side of the block to interact withprofile
- The game profile of the player this is imitatingdefault boolean placeBlock(com.flowpowered.math.vector.Vector3i position, BlockState block, Direction side, GameProfile profile)
position
- The position of the blockblock
- The block state to be set toside
- The face of the block to place onprofile
- The game profile of the player this is imitatingboolean placeBlock(int x, int y, int z, BlockState block, Direction side, GameProfile profile)
x
- The X positiony
- The Y positionz
- The Z positionblock
- The block state to be set toside
- The face of the block to place onprofile
- The game profile of the player this is imitatingdefault boolean digBlock(com.flowpowered.math.vector.Vector3i position, GameProfile profile)
position
- The position of the blockprofile
- The game profile of the player this is imitatingboolean digBlock(int x, int y, int z, GameProfile profile)
x
- The X positiony
- The Y positionz
- The Z positionprofile
- The game profile of the player this is imitatingdefault boolean digBlockWith(com.flowpowered.math.vector.Vector3i position, ItemStack itemStack, GameProfile profile)
position
- The position of the blockitemStack
- The toolprofile
- The game profile of the player this is imitatingboolean digBlockWith(int x, int y, int z, ItemStack itemStack, GameProfile profile)
x
- The X positiony
- The Y positionz
- The Z positionitemStack
- The toolprofile
- The game profile of the player this is imitatingdefault int getBlockDigTimeWith(com.flowpowered.math.vector.Vector3i position, ItemStack itemStack, GameProfile profile)
position
- The position of the blockitemStack
- The item to pretend-dig withprofile
- The game profile of the player this is imitatingint getBlockDigTimeWith(int x, int y, int z, ItemStack itemStack, GameProfile profile)
x
- The X positiony
- The Y positionz
- The Z positionitemStack
- The item to pretend-dig withprofile
- The game profile of the player this is imitatingMutableBlockVolumeWorker<? extends InteractableVolume> getBlockWorker()
BlockVolume
getBlockWorker
in interface BlockVolume
getBlockWorker
in interface MutableBlockVolume