BlockHarvestUtils

public class BlockHarvestUtils

Class BlockHarvestUtils. Provides blockharvestutils functionality for the Hytale server.

java.lang.Object > BlockHarvestUtils

Field Summary

gathering

final BlockGathering gathering

Field gathering.

breaking

final BlockBreakingDropType breaking

Field breaking.

gatherType

final String gatherType

Field gatherType.

itemTool

final ItemTool itemTool

Field itemTool.

durabilityLossBlockTypes

final ItemTool.DurabilityLossBlockTypes[] durabilityLossBlockTypes

Field durabilityLossBlockTypes.

hitBlockTypeId

final String hitBlockTypeId

Field hitBlockTypeId.

hitBlockTypeIndex

final int hitBlockTypeIndex

Field hitBlockTypeIndex.

blockSetModule

final BlockSetModule blockSetModule

Field blockSetModule.

blockTypeIndexes

final int[] blockTypeIndexes

Field blockTypeIndexes.

blockSetIndexes

final int[] blockSetIndexes

Field blockSetIndexes.

world

final World world

Field world.

gameplayConfig

final GameplayConfig gameplayConfig

Field gameplayConfig.

worldChunkComponent

final WorldChunk worldChunkComponent

Field worldChunkComponent.

blockChunkComponent

final BlockChunk blockChunkComponent

Field blockChunkComponent.

environmentId

final int environmentId

Field environmentId.

environmentAsset

final Environment environmentAsset

Field environmentAsset.

targetBlockCenterPos

final Vector3d targetBlockCenterPos

Field targetBlockCenterPos.

filler

final int filler

Field filler.

fillerX

final int fillerX

Field fillerX.

fillerY

final int fillerY

Field fillerY.

fillerZ

final int fillerZ

Field fillerZ.

oldBlockTypeKey

final String oldBlockTypeKey

Field oldBlockTypeKey.

heldItem

final Item heldItem

Field heldItem.

itemToolSpec

final ItemToolSpec itemToolSpec

Field itemToolSpec.

canApplyItemStackPenalties

final boolean canApplyItemStackPenalties

Field canApplyItemStackPenalties.

brokenPenalties

final BrokenPenalties brokenPenalties

Field brokenPenalties.

soft

final SoftBlockDropType soft

Field soft.

unbreakableBlockConfig

final GatheringEffectsConfig unbreakableBlockConfig

Field unbreakableBlockConfig.

particleSystemId

final String particleSystemId

Field particleSystemId.

results

final ObjectList> results

Field results.

soundEventIndex

final int soundEventIndex

Field soundEventIndex.

hitSoundEventLayerIndex

final int hitSoundEventLayerIndex

Field hitSoundEventLayerIndex.

chunkColumnComponent

final ChunkColumn chunkColumnComponent

Field chunkColumnComponent.

chunkSectionRef

final Ref chunkSectionRef

Field chunkSectionRef.

decoBlocks

final BlockPhysics decoBlocks

Field decoBlocks.

isDeco

final boolean isDeco

Field isDeco.

timeResource

final TimeResource timeResource

Field timeResource.

blockHealthComponent

final BlockHealthChunk blockHealthComponent

Field blockHealthComponent.

current

final float current

Field current.

event

final DamageBlockEvent event

Field event.

blockDamage

final BlockHealth blockDamage

Field blockDamage.

requiredTool

final BlockGathering.BlockToolData requiredTool

Field requiredTool.

toolsMatch

final boolean toolsMatch

Field toolsMatch.

toolStateId

final String toolStateId

Field toolStateId.

newBlockType

final BlockType newBlockType

Field newBlockType.

shouldChangeState

final boolean shouldChangeState

Field shouldChangeState.

soundSet

final BlockSoundSet soundSet

Field soundSet.

soundEventIndex2

final int soundEventIndex2

Field soundEventIndex2.

itemStacks

final List itemStacks

Field itemStacks.

dropPosition

final Vector3d dropPosition

Field dropPosition.

itemEntityHolders

final Holder[] itemEntityHolders

Field itemEntityHolders.

toolDrops

final List toolDrops

Field toolDrops.

soundSet2

final BlockSoundSet soundSet2

Field soundSet2.

soundEventIndex3

final int soundEventIndex3

Field soundEventIndex3.

incorrectToolConfig

final GatheringEffectsConfig incorrectToolConfig

Field incorrectToolConfig.

particleSystemId2

final String particleSystemId2

Field particleSystemId2.

results2

final ObjectList> results2

Field results2.

activeHotbarSlot

final byte activeHotbarSlot

Field activeHotbarSlot.

durability

final double durability

Field durability.

hotbar

final ItemContainer hotbar

Field hotbar.

targetBlockX

final int targetBlockX

Field targetBlockX.

targetBlockY

final int targetBlockY

Field targetBlockY.

targetBlockZ

final int targetBlockZ

Field targetBlockZ.

targetBlockTypeIndex

final int targetBlockTypeIndex

Field targetBlockTypeIndex.

targetBlockTypeAsset

final BlockType targetBlockTypeAsset

Field targetBlockTypeAsset.

targetBlockSection

final BlockSection targetBlockSection

Field targetBlockSection.

originBlock

final BlockType originBlock

Field originBlock.

targetWorld

final World targetWorld

Field targetWorld.

blockSection

final BlockSection blockSection

Field blockSection.

chunkIndex

final long chunkIndex

Field chunkIndex.

blockChunkComponent2

final BlockChunk blockChunkComponent2

Field blockChunkComponent2.

blockSection2

final BlockSection blockSection2

Field blockSection2.

x

final int x

Field x.

y

final int y

Field y.

z

final int z

Field z.

blockChunkComponent3

final BlockChunk blockChunkComponent3

Field blockChunkComponent3.

blockSection3

final BlockSection blockSection3

Field blockSection3.

blockTypeIndex

final int blockTypeIndex

Field blockTypeIndex.

blockTypeAsset

final BlockType blockTypeAsset

Field blockTypeAsset.

isNaturalBlockBreak

final boolean isNaturalBlockBreak

Field isNaturalBlockBreak.

blockGathering

final BlockGathering blockGathering

Field blockGathering.

physics

final PhysicsDropType physics

Field physics.

harvest

final HarvestingDropType harvest

Field harvest.

section

final BlockSection section

Field section.

rotationIndex

final int rotationIndex

Field rotationIndex.

centerPosition

final Vector3d centerPosition

Field centerPosition.

itemId

final String itemId

Field itemId.

dropListId

final String dropListId

Field dropListId.

hitBoxType

final BlockBoundingBoxes hitBoxType

Field hitBoxType.

randomItemDrops

final List randomItemDrops

Field randomItemDrops.

itemModule

final ItemModule itemModule

Field itemModule.

randomItemsToDrop

final List randomItemsToDrop

Field randomItemsToDrop.

item

final Item item

Field item.

Method Detail

getSpecPowerDamageBlock

static ItemToolSpec getSpecPowerDamageBlock (@Nullable final Item item, @Nullable final BlockType blockType, @Nullable final ItemTool tool)

Method getSpecPowerDamageBlock.

Parameters:
@Nullable final Item item
@Nullable final BlockType blockType
@Nullable final ItemTool tool

calculateDurabilityUse

static double calculateDurabilityUse (@Nonnull final Item item, @Nullable final BlockType blockType)

Method calculateDurabilityUse.

Parameters:
@Nonnull final Item item
@Nullable final BlockType blockType

performBlockDamage

static boolean performBlockDamage (@Nonnull final Vector3i targetBlock, @Nullable final ItemStack itemStack, @Nullable final ItemTool tool, final float damageScale, final int setBlockSettings, @Nonnull final Ref chunkReference, @Nonnull final CommandBuffer commandBuffer, @Nonnull final ComponentAccessor chunkStore)

Method performBlockDamage.

Parameters:
@Nonnull final Vector3i targetBlock
@Nullable final ItemStack itemStack
@Nullable final ItemTool tool
final float damageScale
final int setBlockSettings
@Nonnull final Ref chunkReference
@Nonnull final CommandBuffer commandBuffer
@Nonnull final ComponentAccessor chunkStore

if

public else if (blockGathering.isSoft()

Method if.

Parameters:
blockGathering.isSoft( blockGathering.isSoft(

performBlockBreak

static void performBlockBreak (@Nullable final Ref ref, @Nullable final ItemStack heldItemStack, @Nonnull final Vector3i targetBlock, @Nonnull final Ref chunkReference, @Nonnull final ComponentAccessor entityStore, @Nonnull final ComponentAccessor chunkStore)

Method performBlockBreak.

Parameters:
@Nullable final Ref ref
@Nullable final ItemStack heldItemStack
@Nonnull final Vector3i targetBlock
@Nonnull final Ref chunkReference
@Nonnull final ComponentAccessor entityStore
@Nonnull final ComponentAccessor chunkStore

naturallyRemoveBlockByPhysics

static void naturallyRemoveBlockByPhysics (@Nonnull final Vector3i blockPosition, @Nonnull final BlockType blockType, final int filler, int setBlockSettings, @Nonnull final Ref chunkReference, @Nonnull final ComponentAccessor entityStore, @Nonnull final ComponentAccessor chunkStore)

Method naturallyRemoveBlockByPhysics.

Parameters:
@Nonnull final Vector3i blockPosition
@Nonnull final BlockType blockType
final int filler
int setBlockSettings
@Nonnull final Ref chunkReference
@Nonnull final ComponentAccessor entityStore
@Nonnull final ComponentAccessor chunkStore

naturallyRemoveBlock

static void naturallyRemoveBlock (@Nonnull final Vector3i blockPosition, @Nullable BlockType blockType, final int filler, final int quantity, final String itemId, final String dropListId, final int setBlockSettings, @Nonnull final Ref chunkReference, @Nonnull final ComponentAccessor entityStore, @Nonnull final ComponentAccessor chunkStore)

Method naturallyRemoveBlock.

Parameters:
@Nonnull final Vector3i blockPosition
@Nullable BlockType blockType
final int filler
final int quantity
final String itemId
final String dropListId
final int setBlockSettings
@Nonnull final Ref chunkReference
@Nonnull final ComponentAccessor entityStore
@Nonnull final ComponentAccessor chunkStore

IllegalStateException

public new IllegalStateException ("Null block type fetched for " + String.valueOf(affectedBlock)

Method IllegalStateException.

Parameters:
"Null block type fetched for " + String.valueOf(affectedBlock

shouldPickupByInteraction

static boolean shouldPickupByInteraction (@Nullable final BlockType blockType)

Method shouldPickupByInteraction.

Parameters:
@Nullable final BlockType blockType

performPickupByInteraction

static void performPickupByInteraction (@Nonnull final Ref ref, @Nonnull final Vector3i targetBlock, @Nonnull BlockType blockType, final int filler, @Nonnull final Ref chunkReference, @Nonnull final ComponentAccessor entityStore, @Nonnull final ComponentAccessor chunkStore)

Method performPickupByInteraction.

Parameters:
@Nonnull final Ref ref
@Nonnull final Vector3i targetBlock
@Nonnull BlockType blockType
final int filler
@Nonnull final Ref chunkReference
@Nonnull final ComponentAccessor entityStore
@Nonnull final ComponentAccessor chunkStore

removeBlock

static void removeBlock (@Nonnull final Vector3i blockPosition, @Nonnull final BlockType blockType, final int setBlockSettings, @Nonnull final Ref chunkReference, @Nonnull final ComponentAccessor chunkStore)

Method removeBlock.

Parameters:
@Nonnull final Vector3i blockPosition
@Nonnull final BlockType blockType
final int setBlockSettings
@Nonnull final Ref chunkReference
@Nonnull final ComponentAccessor chunkStore

getDrops

static List getDrops (@Nonnull final BlockType blockType, final int quantity, @Nullable final String itemId, @Nullable final String dropListId)

Method getDrops.

Parameters:
@Nonnull final BlockType blockType
final int quantity
@Nullable final String itemId
@Nullable final String dropListId

ItemStack

public new ItemStack (itemId, quantity)

Method ItemStack.

Parameters:
itemId itemId
quantity quantity