Interface InteractableVolume
- 
- All Superinterfaces:
- BlockVolume,- LocationBaseDataHolder,- Volume
 - All Known Subinterfaces:
- ServerWorld
 
 public interface InteractableVolume extends BlockVolume, LocationBaseDataHolder 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.spongepowered.api.world.volume.block.BlockVolumeBlockVolume.Immutable, BlockVolume.Modifiable<M extends BlockVolume.Modifiable<M>>, BlockVolume.Mutable, BlockVolume.Streamable<B extends BlockVolume.Streamable<B>>, BlockVolume.Unmodifiable<U extends BlockVolume.Unmodifiable<U>>
 - 
Nested classes/interfaces inherited from interface org.spongepowered.api.world.volume.game.LocationBaseDataHolderLocationBaseDataHolder.Mutable
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.time.DurationblockDigTimeWith(int x, int y, int z, ItemStack itemStack, GameProfile profile)Gets theDurationit takes to dig this block with the specified item.default java.time.DurationblockDigTimeWith(Vector3i position, ItemStack itemStack, GameProfile profile)Gets theDurationit takes to dig this block with the specified item.booleandigBlock(int x, int y, int z, GameProfile profile)Simulate the digging of the block as if a player had done so.default booleandigBlock(Vector3i position, GameProfile profile)Simulate the digging of the block as if a player had done so.booleandigBlockWith(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 booleandigBlockWith(Vector3i position, ItemStack itemStack, GameProfile profile)Simulate the digging of the block with the given tool as if a player had done so.booleanhitBlock(int x, int y, int z, Direction side, GameProfile profile)Simulates hitting a block as if a player had done so.default booleanhitBlock(Vector3i position, Direction side, GameProfile profile)Simulates hitting a block as if a player had done so.booleaninteractBlock(int x, int y, int z, Direction side, GameProfile profile)Simulates the interaction the block as if a player had done so.default booleaninteractBlock(Vector3i position, Direction side, GameProfile profile)Simulates the interaction the block as if a player had done so.booleaninteractBlockWith(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 booleaninteractBlockWith(Vector3i position, ItemStack itemStack, Direction side, GameProfile profile)Simulates the interaction the block using the given item as if the player had done so.booleanplaceBlock(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 booleanplaceBlock(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.- 
Methods inherited from interface org.spongepowered.api.world.volume.block.BlockVolumeblock, block, fluid, fluid, highestPositionAt, highestYAt, highestYAt
 - 
Methods inherited from interface org.spongepowered.api.world.volume.game.LocationBaseDataHolderget, get, get, get, getDouble, getDouble, getDouble, getDouble, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getValue, getValue, getValue, getValue, getValues, getValues, keys, keys, orElse, orElse, orElse, orElse, orElse, orElse, orElse, orElse, orNull, orNull, orNull, orNull, require, require, require, require, supports, supports, supports, supports, supports, supports
 
- 
 
- 
- 
- 
Method Detail- 
hitBlockdefault boolean hitBlock(Vector3i position, Direction side, GameProfile profile) Simulates hitting a block as if a player had done so.The difference between this and digBlock(org.spongepowered.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.- Parameters:
- position- The position of the block
- side- The side of the block to interact with
- profile- The game profile of the player this is imitating
- Returns:
- True if the interact succeeded
 
 - 
hitBlockboolean hitBlock(int x, int y, int z, Direction side, GameProfile profile)Simulates hitting a block as if a player had done so.The difference between this and digBlock(org.spongepowered.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.- Parameters:
- x- The X position
- y- The Y position
- z- The Z position
- side- The side of the block to interact with
- profile- The game profile of the player this is imitating
- Returns:
- True if the interact succeeded
 
 - 
interactBlockdefault boolean interactBlock(Vector3i position, Direction side, GameProfile profile) Simulates the interaction the block as if a player had done so.- Parameters:
- position- The position of the block
- side- The side of the block to interact with
- profile- The game profile of the player this is imitating
- Returns:
- True if the interact succeeded
 
 - 
interactBlockboolean interactBlock(int x, int y, int z, Direction side, GameProfile profile)Simulates the interaction the block as if a player had done so.- Parameters:
- x- The X position
- y- The Y position
- z- The Z position
- side- The side of the block to interact with
- profile- The game profile of the player this is imitating
- Returns:
- True if the interact succeeded
 
 - 
interactBlockWithdefault boolean interactBlockWith(Vector3i position, ItemStack itemStack, Direction side, GameProfile profile) Simulates the interaction the block using the given item as if the player had done so.- Parameters:
- position- The position of the block
- itemStack- The item
- side- The side of the block to interact with
- profile- The game profile of the player this is imitating
- Returns:
- True if the interact succeeded
 
 - 
interactBlockWithboolean 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.- Parameters:
- x- The X position
- y- The Y position
- z- The Z position
- itemStack- The item
- side- The side of the block to interact with
- profile- The game profile of the player this is imitating
- Returns:
- True if the interact succeeded
 
 - 
placeBlockdefault boolean placeBlock(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.- Parameters:
- position- The position of the block
- block- The block state to be set to
- side- The face of the block to place on
- profile- The game profile of the player this is imitating
- Returns:
- Whether the block was successfully set
 
 - 
placeBlockboolean 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.- Parameters:
- x- The X position
- y- The Y position
- z- The Z position
- block- The block state to be set to
- side- The face of the block to place on
- profile- The game profile of the player this is imitating
- Returns:
- Whether the block was successfully set
 
 - 
digBlockdefault boolean digBlock(Vector3i position, GameProfile profile) Simulate the digging of the block as if a player had done so.- Parameters:
- position- The position of the block
- profile- The game profile of the player this is imitating
- Returns:
- Whether the block was destroyed
 
 - 
digBlockboolean digBlock(int x, int y, int z, GameProfile profile)Simulate the digging of the block as if a player had done so.- Parameters:
- x- The X position
- y- The Y position
- z- The Z position
- profile- The game profile of the player this is imitating
- Returns:
- Whether the block was destroyed
 
 - 
digBlockWithdefault boolean digBlockWith(Vector3i position, ItemStack itemStack, GameProfile profile) Simulate the digging of the block with the given tool as if a player had done so.- Parameters:
- position- The position of the block
- itemStack- The tool
- profile- The game profile of the player this is imitating
- Returns:
- Whether the block was destroyed
 
 - 
digBlockWithboolean 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.- Parameters:
- x- The X position
- y- The Y position
- z- The Z position
- itemStack- The tool
- profile- The game profile of the player this is imitating
- Returns:
- Whether the block was destroyed
 
 - 
blockDigTimeWithdefault java.time.Duration blockDigTimeWith(Vector3i position, ItemStack itemStack, GameProfile profile) Gets theDurationit takes to dig this block with the specified item.- Parameters:
- position- The position of the block
- itemStack- The item to pretend-dig with
- profile- The game profile of the player this is imitating
- Returns:
- The duration it takes to dig the block
 
 - 
blockDigTimeWithjava.time.Duration blockDigTimeWith(int x, int y, int z, ItemStack itemStack, GameProfile profile)Gets theDurationit takes to dig this block with the specified item.- Parameters:
- x- The X position
- y- The Y position
- z- The Z position
- itemStack- The item to pretend-dig with
- profile- The game profile of the player this is imitating
- Returns:
- The duration it takes to dig the block
 
 
- 
 
-