FarmingUtil

public class FarmingUtil

Class FarmingUtil. Provides farmingutil functionality for the Hytale server.

java.lang.Object > FarmingUtil

Field Summary

world

final World world

Field world.

worldTimeResource

final WorldTimeResource worldTimeResource

Field worldTimeResource.

currentTime

final Instant currentTime

Field currentTime.

blockType

final BlockType blockType

Field blockType.

farmingConfig

final FarmingData farmingConfig

Field farmingConfig.

currentStageSet

final String currentStageSet

Field currentStageSet.

stages

final FarmingStageData[] stages

Field stages.

section

final ChunkSection section

Field section.

worldX

final int worldX

Field worldX.

worldY

final int worldY

Field worldY.

worldZ

final int worldZ

Field worldZ.

stage

final FarmingStageData stage

Field stage.

range

final Rangef range

Field range.

rand

final double rand

Field rand.

baseDuration

final double baseDuration

Field baseDuration.

modifier

final GrowthModifierAsset modifier

Field modifier.

nextGrowthInNanos

final long nextGrowthInNanos

Field nextGrowthInNanos.

randCap

final long randCap

Field randCap.

cappedNextGrowthInNanos

final long cappedNextGrowthInNanos

Field cappedNextGrowthInNanos.

persistentModel

final PersistentModel persistentModel

Field persistentModel.

modelAsset

final ModelAsset modelAsset

Field modelAsset.

meta

final CapturedNPCMetadata meta

Field meta.

centerPosition

final Vector3d centerPosition

Field centerPosition.

chunk

final WorldChunk chunk

Field chunk.

currentStageIndex

final int currentStageIndex

Field currentStageIndex.

previousStage

final FarmingStageData previousStage

Field previousStage.

newStageSet

final String newStageSet

Field newStageSet.

newStages

final FarmingStageData[] newStages

Field newStages.

chunk2

final WorldChunk chunk2

Field chunk2.

chunkStore

final Store chunkStore

Field chunkStore.

chunkRef

final Ref chunkRef

Field chunkRef.

blockComponentChunk

final BlockComponentChunk blockComponentChunk

Field blockComponentChunk.

now

final Instant now

Field now.

blockIndexColumn

final int blockIndexColumn

Field blockIndexColumn.

blockEntity

final Holder blockEntity

Field blockEntity.

sectionRef

final Ref sectionRef

Field sectionRef.

harvest

final HarvestingDropType harvest

Field harvest.

itemId

final String itemId

Field itemId.

dropListId

final String dropListId

Field dropListId.

Method Detail

tickFarming

static void tickFarming (final CommandBuffer commandBuffer, final BlockSection blockSection, final Ref sectionRef, final Ref blockRef, final FarmingBlock farmingBlock, final int x, final int y, final int z, final boolean initialTick)

Method tickFarming.

Parameters:
final CommandBuffer commandBuffer
final BlockSection blockSection
final Ref sectionRef
final Ref blockRef
final FarmingBlock farmingBlock
final int x
final int y
final int z
final boolean initialTick

harvest

static void harvest (@Nonnull final World world, @Nonnull final ComponentAccessor store, @Nonnull final Ref ref, @Nonnull final BlockType blockType, final int rotationIndex, @Nonnull final Vector3i blockPosition)

Method harvest.

Parameters:
@Nonnull final World world
@Nonnull final ComponentAccessor store
@Nonnull final Ref ref
@Nonnull final BlockType blockType
final int rotationIndex
@Nonnull final Vector3i blockPosition

generateCapturedNPCMetadata

static CapturedNPCMetadata generateCapturedNPCMetadata (final ComponentAccessor componentAccessor, final Ref entityRef, final int roleIndex)

Method generateCapturedNPCMetadata.

Parameters:
final ComponentAccessor componentAccessor
final Ref entityRef
final int roleIndex

harvest0

static boolean harvest0 (@Nonnull final ComponentAccessor store, @Nonnull final Ref ref, @Nonnull final BlockType blockType, final int rotationIndex, @Nonnull final Vector3i blockPosition)

Method harvest0.

Parameters:
@Nonnull final ComponentAccessor store
@Nonnull final Ref ref
@Nonnull final BlockType blockType
final int rotationIndex
@Nonnull final Vector3i blockPosition

giveDrops

Method giveDrops.

Parameters:
@Nonnull final ComponentAccessor store
@Nonnull final Ref ref
@Nonnull final Vector3d origin
@Nonnull final BlockType blockType