Class ProcessingBenchState
java.lang.Object
com.hypixel.hytale.server.core.universe.world.meta.BlockState
com.hypixel.hytale.builtin.crafting.state.BenchState
com.hypixel.hytale.builtin.crafting.state.ProcessingBenchState
- All Implemented Interfaces:
Component<ChunkStore>,TickableBlockState,DestroyableBlockState,ItemContainerBlockState,MarkerBlockState,PlacedByBlockState,Cloneable
public class ProcessingBenchState
extends BenchState
implements TickableBlockState, ItemContainerBlockState, DestroyableBlockState, MarkerBlockState, PlacedByBlockState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanstatic final Codec<ProcessingBenchState> private CombinedItemContainerprivate static final floatprivate static final floatprivate static final floatstatic final booleanprivate ItemContainerprivate floatprivate ItemContainerprivate floatprivate intstatic final com.hypixel.hytale.logger.HytaleLoggerprotected WorldMapManager.MarkerReferenceprivate intprivate ItemContainerstatic final Stringstatic final Stringprivate ProcessingBenchprivate CraftingRecipeprivate Stringprivate final Map<UUID, ProcessingBenchWindow> Fields inherited from class com.hypixel.hytale.builtin.crafting.state.BenchState
bench, upgradeItemsFields inherited from class com.hypixel.hytale.server.core.universe.world.meta.BlockState
BASE_CODEC, CLOSE_WINDOW, OPEN_WINDOW, reference, TYPE_STRUCTUREFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidvoiddropFuelItems(List<ItemStack> itemStacks) private Holder<EntityStore>[]ejectItems(ComponentAccessor<EntityStore> accessor, List<ItemStack> itemStacks) private floatfloatbooleaninitialize(com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType) booleanisActive()voidvoidprotected voidvoidplacedBy(Ref<EntityStore> playerRef, String blockTypeKey, BlockState blockState, ComponentAccessor<EntityStore> componentAccessor) private voidplaySound(World world, int soundEventIndex, ComponentAccessor<EntityStore> componentAccessor) private voidprivate voidprivate voidsendProgress(float progress) booleansetActive(boolean active) voidsetBlockInteractionState(String state, com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType) voidprivate voidvoidtick(float dt, int index, ArchetypeChunk<ChunkStore> archetypeChunk, Store<ChunkStore> store, CommandBuffer<ChunkStore> commandBuffer) voidprivate voidMethods inherited from class com.hypixel.hytale.builtin.crafting.state.BenchState
addUpgradeItems, getBaseBlockType, getBench, getNextLevelUpgradeMaterials, getTierLevel, getTierStateName, setTierLevelMethods inherited from class com.hypixel.hytale.server.core.universe.world.meta.BlockState
__internal_getPosition, clone, ensureState, getBlockPosition, getBlockState, getBlockState, getBlockState, getBlockType, getBlockX, getBlockY, getBlockZ, getCenteredBlockPosition, getChunk, getIndex, getPosition, getReference, getRotationIndex, invalidate, load, load, markNeedsSave, onUnload, saveToDocument, setPosition, setPosition, setReference, toHolder, unloadFromWorld, validateInitializedMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.component.Component
cloneSerializableMethods inherited from interface com.hypixel.hytale.server.core.universe.world.chunk.state.TickableBlockState
getBlockPosition, getChunk, getPosition, invalidate
-
Field Details
-
LOGGER
public static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
EXACT_RESOURCE_AMOUNTS
public static final boolean EXACT_RESOURCE_AMOUNTS- See Also:
-
CODEC
-
EJECT_VELOCITY
private static final float EJECT_VELOCITY- See Also:
-
EJECT_SPREAD_VELOCITY
private static final float EJECT_SPREAD_VELOCITY- See Also:
-
EJECT_VERTICAL_VELOCITY
private static final float EJECT_VERTICAL_VELOCITY- See Also:
-
PROCESSING
- See Also:
-
PROCESS_COMPLETED
- See Also:
-
marker
-
windows
-
processingBench
-
inputContainer
-
fuelContainer
-
outputContainer
-
combinedItemContainer
-
inputProgress
private float inputProgress -
fuelTime
private float fuelTime -
lastConsumedFuelTotal
private int lastConsumedFuelTotal -
nextExtra
private int nextExtra -
processingSlots
-
processingFuelSlots
-
recipeId
-
recipe
-
active
private boolean active
-
-
Constructor Details
-
ProcessingBenchState
public ProcessingBenchState()
-
-
Method Details
-
initialize
public boolean initialize(@Nonnull com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType) - Overrides:
initializein classBenchState
-
setupSlots
private void setupSlots() -
tick
public void tick(float dt, int index, ArchetypeChunk<ChunkStore> archetypeChunk, @Nonnull Store<ChunkStore> store, CommandBuffer<ChunkStore> commandBuffer) - Specified by:
tickin interfaceTickableBlockState
-
getCraftingTimeReductionModifier
private float getCraftingTimeReductionModifier() -
ejectItems
@Nonnull private Holder<EntityStore>[] ejectItems(@Nonnull ComponentAccessor<EntityStore> accessor, @Nonnull List<ItemStack> itemStacks) -
sendProgress
private void sendProgress(float progress) -
sendProcessingSlots
private void sendProcessingSlots() -
sendProcessingFuelSlots
private void sendProcessingFuelSlots() -
isActive
public boolean isActive() -
setActive
public boolean setActive(boolean active) -
updateFuelValues
public void updateFuelValues() -
onDestroy
public void onDestroy()- Specified by:
onDestroyin interfaceDestroyableBlockState- Overrides:
onDestroyin classBenchState
-
getItemContainer
- Specified by:
getItemContainerin interfaceItemContainerBlockState
-
checkForRecipeUpdate
private void checkForRecipeUpdate() -
updateRecipe
private void updateRecipe() -
clearRecipe
private void clearRecipe() -
dropFuelItems
-
getRecipe
-
getWindows
-
getInputProgress
public float getInputProgress() -
onItemChange
-
setBlockInteractionState
public void setBlockInteractionState(@Nonnull String state, @Nonnull com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType) -
setMarker
- Specified by:
setMarkerin interfaceMarkerBlockState
-
placedBy
public void placedBy(@Nonnull Ref<EntityStore> playerRef, @Nonnull String blockTypeKey, @Nonnull BlockState blockState, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
placedByin interfacePlacedByBlockState
-
playSound
private void playSound(@Nonnull World world, int soundEventIndex, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onTierLevelChange
protected void onTierLevelChange()- Overrides:
onTierLevelChangein classBenchState
-