public class BlockHarvestUtils
Class BlockHarvestUtils. Provides blockharvestutils functionality for the Hytale server.
java.lang.Object > BlockHarvestUtils
Field Summary
gathering
Field gathering.
breaking
Field breaking.
gatherType
Field gatherType.
itemTool
Field itemTool.
durabilityLossBlockTypes
Field durabilityLossBlockTypes.
hitBlockTypeId
Field hitBlockTypeId.
hitBlockTypeIndex
Field hitBlockTypeIndex.
blockSetModule
Field blockSetModule.
blockTypeIndexes
Field blockTypeIndexes.
blockSetIndexes
Field blockSetIndexes.
world
Field world.
gameplayConfig
Field gameplayConfig.
worldChunkComponent
Field worldChunkComponent.
blockChunkComponent
Field blockChunkComponent.
environmentId
Field environmentId.
environmentAsset
Field environmentAsset.
targetBlockCenterPos
Field targetBlockCenterPos.
filler
Field filler.
fillerX
Field fillerX.
fillerY
Field fillerY.
fillerZ
Field fillerZ.
oldBlockTypeKey
Field oldBlockTypeKey.
heldItem
Field heldItem.
itemToolSpec
Field itemToolSpec.
canApplyItemStackPenalties
Field canApplyItemStackPenalties.
brokenPenalties
Field brokenPenalties.
soft
Field soft.
unbreakableBlockConfig
Field unbreakableBlockConfig.
particleSystemId
Field particleSystemId.
soundEventIndex
Field soundEventIndex.
hitSoundEventLayerIndex
Field hitSoundEventLayerIndex.
chunkColumnComponent
Field chunkColumnComponent.
chunkSectionRef
Field chunkSectionRef.
decoBlocks
Field decoBlocks.
isDeco
Field isDeco.
timeResource
Field timeResource.
blockHealthComponent
Field blockHealthComponent.
current
Field current.
event
Field event.
blockDamage
Field blockDamage.
requiredTool
Field requiredTool.
toolsMatch
Field toolsMatch.
toolStateId
Field toolStateId.
newBlockType
Field newBlockType.
shouldChangeState
Field shouldChangeState.
soundSet
Field soundSet.
soundEventIndex2
Field soundEventIndex2.
itemStacks
Field itemStacks.
dropPosition
Field dropPosition.
itemEntityHolders
Field itemEntityHolders.
toolDrops
Field toolDrops.
soundSet2
Field soundSet2.
soundEventIndex3
Field soundEventIndex3.
incorrectToolConfig
Field incorrectToolConfig.
particleSystemId2
Field particleSystemId2.
activeHotbarSlot
Field activeHotbarSlot.
durability
Field durability.
hotbar
Field hotbar.
targetBlockX
Field targetBlockX.
targetBlockY
Field targetBlockY.
targetBlockZ
Field targetBlockZ.
targetBlockTypeIndex
Field targetBlockTypeIndex.
targetBlockTypeAsset
Field targetBlockTypeAsset.
targetBlockSection
Field targetBlockSection.
originBlock
Field originBlock.
targetWorld
Field targetWorld.
blockSection
Field blockSection.
chunkIndex
Field chunkIndex.
blockChunkComponent2
Field blockChunkComponent2.
blockSection2
Field blockSection2.
x
Field x.
y
Field y.
z
Field z.
blockChunkComponent3
Field blockChunkComponent3.
blockSection3
Field blockSection3.
blockTypeIndex
Field blockTypeIndex.
blockTypeAsset
Field blockTypeAsset.
isNaturalBlockBreak
Field isNaturalBlockBreak.
blockGathering
Field blockGathering.
physics
Field physics.
harvest
Field harvest.
section
Field section.
rotationIndex
Field rotationIndex.
centerPosition
Field centerPosition.
itemId
Field itemId.
dropListId
Field dropListId.
hitBoxType
Field hitBoxType.
randomItemDrops
Field randomItemDrops.
itemModule
Field itemModule.
randomItemsToDrop
Field randomItemsToDrop.
item
Field item.
Method Detail
getSpecPowerDamageBlock
ItemToolSpec
getSpecPowerDamageBlock
(@Nullable final Item item, @Nullable final BlockType blockType, @Nullable final ItemTool tool)
Method getSpecPowerDamageBlock.
- Parameters:
@Nullable final Itemitem@Nullable final BlockTypeblockType@Nullable final ItemTooltool
calculateDurabilityUse
double
calculateDurabilityUse
(@Nonnull final Item item, @Nullable final BlockType blockType)
Method calculateDurabilityUse.
- Parameters:
@Nonnull final Itemitem@Nullable final BlockTypeblockType
performBlockDamage
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 Vector3itargetBlock@Nullable final ItemStackitemStack@Nullable final ItemTooltoolfinal floatdamageScalefinal intsetBlockSettings@Nonnull final RefchunkReference@Nonnull final CommandBuffercommandBuffer@Nonnull final ComponentAccessorchunkStore
if
else
if
(blockGathering.isSoft()
Method if.
- Parameters:
blockGathering.isSoft(blockGathering.isSoft(
performBlockBreak
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 Refref@Nullable final ItemStackheldItemStack@Nonnull final Vector3itargetBlock@Nonnull final RefchunkReference@Nonnull final ComponentAccessorentityStore@Nonnull final ComponentAccessorchunkStore
naturallyRemoveBlockByPhysics
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 Vector3iblockPosition@Nonnull final BlockTypeblockTypefinal intfillerintsetBlockSettings@Nonnull final RefchunkReference@Nonnull final ComponentAccessorentityStore@Nonnull final ComponentAccessorchunkStore
naturallyRemoveBlock
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 Vector3iblockPosition@Nullable BlockTypeblockTypefinal intfillerfinal intquantityfinal StringitemIdfinal StringdropListIdfinal intsetBlockSettings@Nonnull final RefchunkReference@Nonnull final ComponentAccessorentityStore@Nonnull final ComponentAccessorchunkStore
IllegalStateException
new
IllegalStateException
("Null block type fetched for " + String.valueOf(affectedBlock)
Method IllegalStateException.
- Parameters:
"Null block type fetched for " +String.valueOf(affectedBlock
shouldPickupByInteraction
Method shouldPickupByInteraction.
- Parameters:
@Nullable final BlockTypeblockType
performPickupByInteraction
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 Refref@Nonnull final Vector3itargetBlock@Nonnull BlockTypeblockTypefinal intfiller@Nonnull final RefchunkReference@Nonnull final ComponentAccessorentityStore@Nonnull final ComponentAccessorchunkStore
removeBlock
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 Vector3iblockPosition@Nonnull final BlockTypeblockTypefinal intsetBlockSettings@Nonnull final RefchunkReference@Nonnull final ComponentAccessorchunkStore
getDrops
List
getDrops
(@Nonnull final BlockType blockType, final int quantity, @Nullable final String itemId, @Nullable final String dropListId)
Method getDrops.
- Parameters:
@Nonnull final BlockTypeblockTypefinal intquantity@Nullable final StringitemId@Nullable final StringdropListId
ItemStack
new
ItemStack
(itemId, quantity)
Method ItemStack.
- Parameters:
itemIditemIdquantityquantity