Class BenchState
java.lang.Object
com.hypixel.hytale.server.core.universe.world.meta.BlockState
com.hypixel.hytale.builtin.crafting.state.BenchState
- All Implemented Interfaces:
Component<ChunkStore>,DestroyableBlockState,Cloneable
- Direct Known Subclasses:
ProcessingBenchState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Benchstatic BuilderCodec<BenchState> private intprotected ItemStack[]Fields 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 TypeMethodDescriptionvoidaddUpgradeItems(List<ItemStack> consumed) private voidcom.hypixel.hytale.server.core.asset.type.blocktype.config.BlockTypegetBench()intbooleaninitialize(com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType) voidprotected voidvoidsetTierLevel(int newTierLevel) Methods 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
cloneSerializable
-
Field Details
-
CODEC
-
tierLevel
private int tierLevel -
upgradeItems
-
bench
-
-
Constructor Details
-
BenchState
public BenchState()
-
-
Method Details
-
getTierLevel
public int getTierLevel() -
initialize
public boolean initialize(@Nonnull com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType blockType) - Overrides:
initializein classBlockState
-
addUpgradeItems
-
dropUpgradeItems
private void dropUpgradeItems() -
getBench
-
setTierLevel
public void setTierLevel(int newTierLevel) -
getNextLevelUpgradeMaterials
-
onTierLevelChange
protected void onTierLevelChange() -
getBaseBlockType
public com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType getBaseBlockType() -
getTierStateName
-
onDestroy
public void onDestroy()- Specified by:
onDestroyin interfaceDestroyableBlockState
-