public class BlockPlaceUtils
Class BlockPlaceUtils. Provides blockplaceutils functionality for the Hytale server.
java.lang.Object > BlockPlaceUtils
Field Summary
event
Field event.
positionIsDifferent
Field positionIsDifferent.
chunkIndex
Field chunkIndex.
playerRefComponent
Field playerRefComponent.
playerComponent
Field playerComponent.
isAdventureMode
Field isAdventureMode.
transaction
Field transaction.
blockTypeAsset
Field blockTypeAsset.
prefabListAssetId
Field prefabListAssetId.
worldChunkComponent
Field worldChunkComponent.
success
Field success.
isAdventure
Field isAdventure.
hotbar
Field hotbar.
itemStackTransaction
Field itemStackTransaction.
metadata
Field metadata.
bsonValue
Field bsonValue.
document
Field document.
blockState
Field blockState.
prefabListAsset
Field prefabListAsset.
randomPrefab
Field randomPrefab.
world
Field world.
prefabBuffer
Field prefabBuffer.
store
Field store.
prefabBufferAccessor
Field prefabBufferAccessor.
worldConfig
Field worldConfig.
environmentId
Field environmentId.
environment
Field environment.
blockType
Field blockType.
rotationIndex
Field rotationIndex.
hitBoxType
Field hitBoxType.
placeBlockSettings
Field placeBlockSettings.
chunkColumnComponent
Field chunkColumnComponent.
sectionRef
Field sectionRef.
blockIndexInChunk
Field blockIndexInChunk.
blockComponentChunk
Field blockComponentChunk.
blockRef
Field blockRef.
uuidComponent
Field uuidComponent.
placedByInteractionComponent
Field placedByInteractionComponent.
existingBlock
Field existingBlock.
gathering
Field gathering.
dropQuantity
Field dropQuantity.
softGathering
Field softGathering.
setBlockSettings
Field setBlockSettings.
Method Detail
placeBlock
void
placeBlock
(@Nonnull final Ref ref, @Nonnull ItemStack itemStack, @Nullable String blockTypeKey, @Nonnull final ItemContainer itemContainer, @Nonnull final Vector3i placementNormal, @Nonnull final Vector3i blockPosition, @Nonnull final BlockRotation blockRotation, @Nullable final Inventory inventory, final byte activeSlot, final boolean removeItemInHand, @Nonnull final Ref chunkReference, @Nonnull final ComponentAccessor chunkStore, @Nonnull final ComponentAccessor entityStore)
Method placeBlock.
- Parameters:
@Nonnull final Refref@Nonnull ItemStackitemStack@Nullable StringblockTypeKey@Nonnull final ItemContaineritemContainer@Nonnull final Vector3iplacementNormal@Nonnull final Vector3iblockPosition@Nonnull final BlockRotationblockRotation@Nullable final Inventoryinventoryfinal byteactiveSlotfinal booleanremoveItemInHand@Nonnull final RefchunkReference@Nonnull final ComponentAccessorchunkStore@Nonnull final ComponentAccessorentityStore
onPlaceBlockFailure
void
onPlaceBlockFailure
(@Nullable final ItemStack itemStack, @Nullable final Inventory inventory, final byte activeSlot, @Nullable final Player playerComponent, @Nonnull final BlockSection blockSection, @Nonnull final Vector3i blockPosition)
Method onPlaceBlockFailure.
- Parameters:
@Nullable final ItemStackitemStack@Nullable final Inventoryinventoryfinal byteactiveSlot@Nullable final PlayerplayerComponent@Nonnull final BlockSectionblockSection@Nonnull final Vector3iblockPosition
onPlaceBlockSuccess
void
onPlaceBlockSuccess
(@Nullable final ItemStack itemStack, @Nonnull final WorldChunk worldChunkComponent, @Nonnull final Vector3i blockPosition)
Method onPlaceBlockSuccess.
- Parameters:
@Nullable final ItemStackitemStack@Nonnull final WorldChunkworldChunkComponent@Nonnull final Vector3iblockPosition
validateBlockToPlace
boolean
validateBlockToPlace
(@Nullable final String blockTypeKey, @Nullable final PlayerRef playerRefComponent)
Method validateBlockToPlace.
- Parameters:
@Nullable final StringblockTypeKey@Nullable final PlayerRefplayerRefComponent
validateAndPlacePrefab
boolean
validateAndPlacePrefab
(@Nonnull final Vector3i blockPosition, @Nonnull final String prefabListAssetId, @Nullable final PlayerRef playerRefComponent, @Nonnull final ComponentAccessor componentAccessor)
Method validateAndPlacePrefab.
- Parameters:
@Nonnull final Vector3iblockPosition@Nonnull final StringprefabListAssetId@Nullable final PlayerRefplayerRefComponent@Nonnull final ComponentAccessorcomponentAccessor
Random
new
Random
()
Method Random.
tryPlaceBlock
boolean
tryPlaceBlock
(@Nonnull final Ref ref, @Nonnull final Vector3i placementNormal, @Nonnull final Vector3i blockPosition, @Nonnull final String blockTypeKey, @Nonnull final RotationTuple rotation, @Nonnull final WorldChunk worldChunkComponent, @Nonnull final BlockChunk blockChunkComponent, @Nonnull final Ref chunkReference, @Nonnull final ComponentAccessor chunkStore, @Nonnull final ComponentAccessor entityStore)
Method tryPlaceBlock.
- Parameters:
@Nonnull final Refref@Nonnull final Vector3iplacementNormal@Nonnull final Vector3iblockPosition@Nonnull final StringblockTypeKey@Nonnull final RotationTuplerotation@Nonnull final WorldChunkworldChunkComponent@Nonnull final BlockChunkblockChunkComponent@Nonnull final RefchunkReference@Nonnull final ComponentAccessorchunkStore@Nonnull final ComponentAccessorentityStore
breakAndDropReplacedBlock
>
breakAndDropReplacedBlock
(blockPosition.clone()
Method breakAndDropReplacedBlock.
- Parameters:
blockPosition.clone(blockPosition.clone(
PlacedByInteractionComponent
new
PlacedByInteractionComponent
(uuidComponent.getUuid()
Method PlacedByInteractionComponent.
- Parameters:
uuidComponent.getUuid(uuidComponent.getUuid(
canPlaceBlock
boolean
canPlaceBlock
(@Nonnull final BlockType blockType, @Nonnull final String placedBlockTypeKey)
Method canPlaceBlock.
- Parameters:
@Nonnull final BlockTypeblockType@Nonnull final StringplacedBlockTypeKey