BlockPlaceUtils

public class BlockPlaceUtils

Class BlockPlaceUtils. Provides blockplaceutils functionality for the Hytale server.

java.lang.Object > BlockPlaceUtils

Field Summary

event

final PlaceBlockEvent event

Field event.

positionIsDifferent

final boolean positionIsDifferent

Field positionIsDifferent.

chunkIndex

final long chunkIndex

Field chunkIndex.

playerRefComponent

final PlayerRef playerRefComponent

Field playerRefComponent.

playerComponent

final Player playerComponent

Field playerComponent.

isAdventureMode

final boolean isAdventureMode

Field isAdventureMode.

transaction

final ItemStackSlotTransaction transaction

Field transaction.

blockTypeAsset

final BlockType blockTypeAsset

Field blockTypeAsset.

prefabListAssetId

final String prefabListAssetId

Field prefabListAssetId.

worldChunkComponent

final WorldChunk worldChunkComponent

Field worldChunkComponent.

success

final boolean success

Field success.

isAdventure

final boolean isAdventure

Field isAdventure.

hotbar

final ItemContainer hotbar

Field hotbar.

itemStackTransaction

final ItemStackTransaction itemStackTransaction

Field itemStackTransaction.

metadata

final BsonDocument metadata

Field metadata.

bsonValue

final BsonValue bsonValue

Field bsonValue.

document

final BsonDocument document

Field document.

blockState

final BlockState blockState

Field blockState.

prefabListAsset

final PrefabListAsset prefabListAsset

Field prefabListAsset.

randomPrefab

final Path randomPrefab

Field randomPrefab.

world

final World world

Field world.

prefabBuffer

final PrefabBuffer prefabBuffer

Field prefabBuffer.

store

final Store store

Field store.

prefabBufferAccessor

final PrefabBuffer.PrefabBufferAccessor prefabBufferAccessor

Field prefabBufferAccessor.

worldConfig

final WorldConfig worldConfig

Field worldConfig.

environmentId

final int environmentId

Field environmentId.

environment

final Environment environment

Field environment.

blockType

final BlockType blockType

Field blockType.

rotationIndex

final int rotationIndex

Field rotationIndex.

hitBoxType

final BlockBoundingBoxes hitBoxType

Field hitBoxType.

placeBlockSettings

final int placeBlockSettings

Field placeBlockSettings.

chunkColumnComponent

final ChunkColumn chunkColumnComponent

Field chunkColumnComponent.

sectionRef

final Ref sectionRef

Field sectionRef.

blockIndexInChunk

final int blockIndexInChunk

Field blockIndexInChunk.

blockComponentChunk

final BlockComponentChunk blockComponentChunk

Field blockComponentChunk.

blockRef

final Ref blockRef

Field blockRef.

uuidComponent

final UUIDComponent uuidComponent

Field uuidComponent.

placedByInteractionComponent

final PlacedByInteractionComponent placedByInteractionComponent

Field placedByInteractionComponent.

existingBlock

final BlockType existingBlock

Field existingBlock.

gathering

final BlockGathering gathering

Field gathering.

dropQuantity

final int dropQuantity

Field dropQuantity.

softGathering

final SoftBlockDropType softGathering

Field softGathering.

setBlockSettings

final int setBlockSettings

Field setBlockSettings.

Method Detail

placeBlock

static 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 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

onPlaceBlockFailure

static 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 ItemStack itemStack
@Nullable final Inventory inventory
final byte activeSlot
@Nullable final Player playerComponent
@Nonnull final BlockSection blockSection
@Nonnull final Vector3i blockPosition

onPlaceBlockSuccess

static void onPlaceBlockSuccess (@Nullable final ItemStack itemStack, @Nonnull final WorldChunk worldChunkComponent, @Nonnull final Vector3i blockPosition)

Method onPlaceBlockSuccess.

Parameters:
@Nullable final ItemStack itemStack
@Nonnull final WorldChunk worldChunkComponent
@Nonnull final Vector3i blockPosition

validateBlockToPlace

static boolean validateBlockToPlace (@Nullable final String blockTypeKey, @Nullable final PlayerRef playerRefComponent)

Method validateBlockToPlace.

Parameters:
@Nullable final String blockTypeKey
@Nullable final PlayerRef playerRefComponent

validateAndPlacePrefab

static boolean validateAndPlacePrefab (@Nonnull final Vector3i blockPosition, @Nonnull final String prefabListAssetId, @Nullable final PlayerRef playerRefComponent, @Nonnull final ComponentAccessor componentAccessor)

Method validateAndPlacePrefab.

Parameters:
@Nonnull final Vector3i blockPosition
@Nonnull final String prefabListAssetId
@Nullable final PlayerRef playerRefComponent
@Nonnull final ComponentAccessor componentAccessor

Random

public new Random ()

Method Random.

tryPlaceBlock

static 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 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

breakAndDropReplacedBlock

public > breakAndDropReplacedBlock (blockPosition.clone()

Method breakAndDropReplacedBlock.

Parameters:
blockPosition.clone( blockPosition.clone(

PlacedByInteractionComponent

public new PlacedByInteractionComponent (uuidComponent.getUuid()

Method PlacedByInteractionComponent.

Parameters:
uuidComponent.getUuid( uuidComponent.getUuid(

canPlaceBlock

static boolean canPlaceBlock (@Nonnull final BlockType blockType, @Nonnull final String placedBlockTypeKey)

Method canPlaceBlock.

Parameters:
@Nonnull final BlockType blockType
@Nonnull final String placedBlockTypeKey