ProcessingBenchState

public class ProcessingBenchState extends BenchState implements TickableBlockState, ItemContainerBlockState, DestroyableBlockState, MarkerBlockState, PlacedByBlockState

Class ProcessingBenchState. Provides processingbenchstate functionality for the Hytale server.

java.lang.Object > BenchState > ProcessingBenchState

Field Summary

marker

protected WorldMapManager.MarkerReference marker

Field marker.

processingBench

private ProcessingBench processingBench

Field processingBench.

inputContainer

private ItemContainer inputContainer

Field inputContainer.

fuelContainer

private ItemContainer fuelContainer

Field fuelContainer.

outputContainer

private ItemContainer outputContainer

Field outputContainer.

combinedItemContainer

private CombinedItemContainer combinedItemContainer

Field combinedItemContainer.

inputProgress

private float inputProgress

Field inputProgress.

fuelTime

private float fuelTime

Field fuelTime.

lastConsumedFuelTotal

private int lastConsumedFuelTotal

Field lastConsumedFuelTotal.

nextExtra

private int nextExtra

Field nextExtra.

recipeId

private String recipeId

Field recipeId.

recipe

private CraftingRecipe recipe

Field recipe.

active

private boolean active

Field active.

itemStacks

final List itemStacks

Field itemStacks.

world

final World world

Field world.

store

final Store store

Field store.

itemEntityHolders

final Holder[] itemEntityHolders

Field itemEntityHolders.

remainder

final List remainder

Field remainder.

tierLevel

final int tierLevel

Field tierLevel.

input

final ProcessingBench.ProcessingSlot[] input

Field input.

inputSlotsCount

final short inputSlotsCount

Field inputSlotsCount.

inputSlot

final ProcessingBench.ProcessingSlot inputSlot

Field inputSlot.

resourceTypeId

final String resourceTypeId

Field resourceTypeId.

shouldFilterValidIngredients

final boolean shouldFilterValidIngredients

Field shouldFilterValidIngredients.

validIngredients

final ObjectArrayList validIngredients

Field validIngredients.

recipes

final List recipes

Field recipes.

inputMaterials

final List inputMaterials

Field inputMaterials.

benchFuel

final ProcessingBench.ProcessingSlot[] benchFuel

Field benchFuel.

fuelCapacity

final short fuelCapacity

Field fuelCapacity.

fuel

final ProcessingBench.ProcessingSlot fuel

Field fuel.

outputSlotsCount

final short outputSlotsCount

Field outputSlotsCount.

entityStore

final Store entityStore

Field entityStore.

blockType

final BlockType blockType

Field blockType.

currentState

final String currentState

Field currentState.

result

final List result

Field result.

allowNoInputProcessing

final boolean allowNoInputProcessing

Field allowNoInputProcessing.

fuelSlots

final ProcessingBench.ProcessingSlot[] fuelSlots

Field fuelSlots.

hasFuelSlots

final boolean hasFuelSlots

Field hasFuelSlots.

itemInSlot

final ItemStack itemInSlot

Field itemInSlot.

fuelSlot

final ProcessingBench.ProcessingSlot fuelSlot

Field fuelSlot.

resourceQuantity

final ResourceQuantity resourceQuantity

Field resourceQuantity.

slot

final ItemStack slot

Field slot.

fuelQuality

final double fuelQuality

Field fuelQuality.

transaction

final ResourceTransaction transaction

Field transaction.

extra

final ProcessingBench.ExtraOutput extra

Field extra.

extraItemStacks

final ObjectArrayList extraItemStacks

Field extraItemStacks.

addTransaction

final ListTransaction addTransaction

Field addTransaction.

remainderItems

final List remainderItems

Field remainderItems.

craftingTimeReductionModifier

final float craftingTimeReductionModifier

Field craftingTimeReductionModifier.

progressPercent

final float progressPercent

Field progressPercent.

remainderItems2

final List remainderItems2

Field remainderItems2.

slots

final IntArrayList slots

Field slots.

slot2

final int slot2

Field slot2.

transaction2

final MaterialSlotTransaction transaction2

Field transaction2.

addTransaction2

final ListTransaction addTransaction2

Field addTransaction2.

remainder2

final ItemStack remainder2

Field remainder2.

itemEntityHolders2

final Holder[] itemEntityHolders2

Field itemEntityHolders2.

transaction3

final ListTransaction transaction3

Field transaction3.

addTransaction3

final ListTransaction addTransaction3

Field addTransaction3.

remainder3

final ItemStack remainder3

Field remainder3.

itemEntityHolders3

final Holder[] itemEntityHolders3

Field itemEntityHolders3.

levelData

final BenchTierLevel levelData

Field levelData.

rotation

final RotationTuple rotation

Field rotation.

frontDir

final Vector3d frontDir

Field frontDir.

hitboxAsset

final BlockBoundingBoxes hitboxAsset

Field hitboxAsset.

depth

final double depth

Field depth.

frontOffset

final double frontOffset

Field frontOffset.

random

final ThreadLocalRandom random

Field random.

velocityX

final float velocityX

Field velocityX.

velocityZ

final float velocityZ

Field velocityZ.

holder

final Holder holder

Field holder.

fuelPercent

final float fuelPercent

Field fuelPercent.

dropPosition

final Vector3d dropPosition

Field dropPosition.

matching

final List matching

Field matching.

itemId

final String itemId

Field itemId.

materialQuantity

final int materialQuantity

Field materialQuantity.

metadata

final BsonDocument metadata

Field metadata.

material

final MaterialQuantity material

Field material.

i

final int i

Field i.

out

final int out

Field out.

recipe2

final CraftingRecipe recipe2

Field recipe2.

fuelDropItemId

final String fuelDropItemId

Field fuelDropItemId.

item

final Item item

Field item.

quantity

final int quantity

Field quantity.

playerComponent

final Player playerComponent

Field playerComponent.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

transformPacket

final Transform transformPacket

Field transformPacket.

pos

final Vector3i pos

Field pos.

Method Detail

ProcessingBenchState

public public ProcessingBenchState ()

Method ProcessingBenchState.

initialize

public boolean initialize (@Nonnull final BlockType blockType)

Method initialize.

Parameters:
@Nonnull final BlockType blockType

setupSlots

private void setupSlots ()

Method setupSlots.

ResourceFilter

public new ResourceFilter (new ResourceQuantity(resourceTypeId, 1)

Method ResourceFilter.

Parameters:
new ResourceQuantity(resourceTypeId
1 1

if

public else if (shouldFilterValidIngredients)

Method if.

Parameters:
shouldFilterValidIngredients shouldFilterValidIngredients

tick

public void tick (final float dt, final int index, final ArchetypeChunk archetypeChunk, @Nonnull final Store store, final CommandBuffer commandBuffer)

Method tick.

Parameters:
final float dt
final int index
final ArchetypeChunk archetypeChunk
@Nonnull final Store store
final CommandBuffer commandBuffer

getCraftingTimeReductionModifier

private float getCraftingTimeReductionModifier ()

Method getCraftingTimeReductionModifier.

ejectItems

private Holder[] ejectItems (@Nonnull final ComponentAccessor accessor, @Nonnull final List itemStacks)

Method ejectItems.

Parameters:
@Nonnull final ComponentAccessor accessor
@Nonnull final List itemStacks

sendProgress

private void sendProgress (final float progress)

Method sendProgress.

Parameters:
final float progress

sendProcessingSlots

private void sendProcessingSlots ()

Method sendProcessingSlots.

sendProcessingFuelSlots

private void sendProcessingFuelSlots ()

Method sendProcessingFuelSlots.

isActive

public boolean isActive ()

Method isActive.

setActive

public boolean setActive (final boolean active)

Method setActive.

Parameters:
final boolean active

updateFuelValues

public void updateFuelValues ()

Method updateFuelValues.

onDestroy

public void onDestroy ()

Method onDestroy.

getItemContainer

public CombinedItemContainer getItemContainer ()

Method getItemContainer.

checkForRecipeUpdate

private void checkForRecipeUpdate ()

Method checkForRecipeUpdate.

updateRecipe

private void updateRecipe ()

Method updateRecipe.

clearRecipe

private void clearRecipe ()

Method clearRecipe.

dropFuelItems

public void dropFuelItems (@Nonnull final List itemStacks)

Method dropFuelItems.

Parameters:
@Nonnull final List itemStacks

ItemStack

public new ItemStack (fuelDropItemId, quantity)

Method ItemStack.

Parameters:
fuelDropItemId fuelDropItemId
quantity quantity

getRecipe

public CraftingRecipe getRecipe ()

Method getRecipe.

getWindows

public ProcessingBenchWindow> getWindows ()

Method getWindows.

getInputProgress

public float getInputProgress ()

Method getInputProgress.

onItemChange

public void onItemChange (final ItemContainer.ItemContainerChangeEvent event)

Method onItemChange.

Parameters:
final ItemContainer.ItemContainerChangeEvent event

setBlockInteractionState

public void setBlockInteractionState (@Nonnull final String state, @Nonnull final BlockType blockType)

Method setBlockInteractionState.

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

setMarker

public void setMarker (final WorldMapManager.MarkerReference marker)

Method setMarker.

Parameters:
final WorldMapManager.MarkerReference marker

placedBy

public void placedBy (@Nonnull final Ref playerRef, @Nonnull final String blockTypeKey, @Nonnull final BlockState blockState, @Nonnull final ComponentAccessor componentAccessor)

Method placedBy.

Parameters:
@Nonnull final Ref playerRef
@Nonnull final String blockTypeKey
@Nonnull final BlockState blockState
@Nonnull final ComponentAccessor componentAccessor

MapMarker

public new MapMarker (this.processingBench.getIconId()

Method MapMarker.

Parameters:
this.processingBench.getIconId( this.processingBench.getIconId(

playSound

private void playSound (@Nonnull final World world, final int soundEventIndex, @Nonnull final ComponentAccessor componentAccessor)

Method playSound.

Parameters:
@Nonnull final World world
final int soundEventIndex
@Nonnull final ComponentAccessor componentAccessor

onTierLevelChange

protected void onTierLevelChange ()

Method onTierLevelChange.