TreasureMapObjectiveTask

public class TreasureMapObjectiveTask extends ObjectiveTask

Class TreasureMapObjectiveTask. Provides treasuremapobjectivetask functionality for the Hytale server.

java.lang.Object > ObjectiveTask > TreasureMapObjectiveTask

Field Summary

currentCompletion

private int currentCompletion

Field currentCompletion.

chestCount

private int chestCount

Field chestCount.

chestConfigs

final TreasureMapObjectiveTaskAsset.ChestConfig[] chestConfigs

Field chestConfigs.

chestUUID

final UUID chestUUID

Field chestUUID.

chestMarkerID

final String chestMarkerID

Field chestMarkerID.

playerRef

final Ref playerRef

Field playerRef.

store

final Store store

Field store.

conditionPosition

final Vector3i conditionPosition

Field conditionPosition.

transactionRecord

final SpawnTreasureChestTransactionRecord transactionRecord

Field transactionRecord.

treasureChestState

final TreasureChestState treasureChestState

Field treasureChestState.

stacks

final List stacks

Field stacks.

worldChunk

final WorldChunk worldChunk

Field worldChunk.

blockState

final BlockState blockState

Field blockState.

packet

final com.hypixel.hytale.protocol.ObjectiveTask packet

Field packet.

Method Detail

TreasureMapObjectiveTask

public public TreasureMapObjectiveTask (@Nonnull final TreasureMapObjectiveTaskAsset asset, final int taskSetIndex, final int taskIndex)

Method TreasureMapObjectiveTask.

Parameters:
@Nonnull final TreasureMapObjectiveTaskAsset asset
final int taskSetIndex
final int taskIndex

getAsset

public TreasureMapObjectiveTaskAsset getAsset ()

Method getAsset.

getChestMarkerIDFromUUID

public String getChestMarkerIDFromUUID (@Nonnull final UUID uuid)

Method getChestMarkerIDFromUUID.

Parameters:
@Nonnull final UUID uuid

setup0

protected TransactionRecord[] setup0 (@Nonnull final Objective objective, @Nonnull final World world, @Nonnull final Store store)

Method setup0.

Parameters:
@Nonnull final Objective objective
@Nonnull final World world
@Nonnull final Store store

checkCompletion

public boolean checkCompletion ()

Method checkCompletion.

onTreasureChestOpeningEvent

private void onTreasureChestOpeningEvent (@Nonnull final Objective objective, @Nonnull final TreasureChestOpeningEvent event)

Method onTreasureChestOpeningEvent.

Parameters:
@Nonnull final Objective objective
@Nonnull final TreasureChestOpeningEvent event

spawnChest

private TransactionRecord spawnChest (@Nonnull final Objective objective, @Nonnull final World world, @Nonnull final TreasureMapObjectiveTaskAsset.ChestConfig chestConfig, @Nonnull final ComponentAccessor componentAccessor)

Method spawnChest.

Parameters:
@Nonnull final Objective objective
@Nonnull final World world
@Nonnull final TreasureMapObjectiveTaskAsset.ChestConfig chestConfig
@Nonnull final ComponentAccessor componentAccessor

SpawnTreasureChestTransactionRecord

public new SpawnTreasureChestTransactionRecord (world.getWorldConfig()

Method SpawnTreasureChestTransactionRecord.

Parameters:
world.getWorldConfig( world.getWorldConfig(

MapMarker

public new MapMarker (this.getChestMarkerIDFromUUID(chestUUID)

Method MapMarker.

Parameters:
this.getChestMarkerIDFromUUID(chestUUID this.getChestMarkerIDFromUUID(chestUUID

Transform

public new Transform (conditionPosition)

Method Transform.

Parameters:
conditionPosition conditionPosition

spawnChestBlock

private TreasureChestState spawnChestBlock (@Nonnull final World world, @Nonnull final Vector3i conditionPosition, final String chestBlockTypeKey, @Nonnull final SpawnTreasureChestTransactionRecord transactionRecord)

Method spawnChestBlock.

Parameters:
@Nonnull final World world
@Nonnull final Vector3i conditionPosition
final String chestBlockTypeKey
@Nonnull final SpawnTreasureChestTransactionRecord transactionRecord

calculateChestSpawnPosition

private Vector3i calculateChestSpawnPosition (@Nonnull final TreasureMapObjectiveTaskAsset.ChestConfig chestConfig, @Nonnull final Objective objective, @Nonnull final World world, @Nonnull final ComponentAccessor componentAccessor)

Method calculateChestSpawnPosition.

Parameters:
@Nonnull final TreasureMapObjectiveTaskAsset.ChestConfig chestConfig
@Nonnull final Objective objective
@Nonnull final World world
@Nonnull final ComponentAccessor componentAccessor

toPacket

public com.hypixel.hytale.protocol.ObjectiveTask toPacket (@Nonnull final Objective objective)

Method toPacket.

Parameters:
@Nonnull final Objective objective

toString

public String toString ()

Method toString.