Class BlockHealthChunk
java.lang.Object
com.hypixel.hytale.server.core.modules.blockhealth.BlockHealthChunk
- All Implemented Interfaces:
Component<ChunkStore>,Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<Vector3i, FragileBlock> private final Map<Vector3i, BlockHealth> static final BuilderCodec<BlockHealthChunk> private Instantprivate static final byteFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()voidcreateBlockDamagePackets(List<Packet> list) damageBlock(Instant currentUptime, World world, Vector3i block, float health) voiddeserialize(byte[] data) floatgetBlockHealth(Vector3i block) booleanisBlockFragile(Vector3i block) voidmakeBlockFragile(Vector3i blockLocation, float fragileDuration) voidremoveBlock(World world, Vector3i block) repairBlock(World world, Vector3i block, float progress) byte[]voidsetLastRepairGameTime(Instant lastRepairGameTime) Methods 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
-
SERIALIZATION_VERSION
private static final byte SERIALIZATION_VERSION- See Also:
-
CODEC
-
blockHealthMap
-
blockFragilityMap
-
lastRepairGameTime
-
-
Constructor Details
-
BlockHealthChunk
public BlockHealthChunk()
-
-
Method Details
-
getLastRepairGameTime
-
setLastRepairGameTime
-
getBlockHealthMap
-
getBlockFragilityMap
-
damageBlock
@Nonnull public BlockHealth damageBlock(Instant currentUptime, @Nonnull World world, @Nonnull Vector3i block, float health) -
repairBlock
@Nonnull public BlockHealth repairBlock(@Nonnull World world, @Nonnull Vector3i block, float progress) -
removeBlock
-
makeBlockFragile
-
isBlockFragile
-
getBlockHealth
-
createBlockDamagePackets
-
clone
- Specified by:
clonein interfaceComponent<ChunkStore>- Overrides:
clonein classObject
-
deserialize
public void deserialize(@Nonnull byte[] data) -
serialize
public byte[] serialize()
-