BuilderRole

public class BuilderRole extends SpawnableWithModelBuilder

Class BuilderRole. Provides builderrole functionality for the Hytale server.

java.lang.Object > SpawnableWithModelBuilder > BuilderRole

Field Summary

displayNames

protected String[] displayNames

Field displayNames.

startState

protected String startState

Field startState.

defaultSubState

protected String defaultSubState

Field defaultSubState.

startStateIndex

protected int startStateIndex

Field startStateIndex.

startSubStateIndex

protected int startSubStateIndex

Field startSubStateIndex.

debugFlags

protected String debugFlags

Field debugFlags.

inertia

protected double inertia

Field inertia.

knockbackScale

protected double knockbackScale

Field knockbackScale.

opaqueBlockSet

protected String opaqueBlockSet

Field opaqueBlockSet.

applyAvoidance

protected boolean applyAvoidance

Field applyAvoidance.

entityAvoidanceStrength

protected double entityAvoidanceStrength

Field entityAvoidanceStrength.

collisionDistance

protected double collisionDistance

Field collisionDistance.

collisionForceFalloff

protected double collisionForceFalloff

Field collisionForceFalloff.

collisionRadius

protected double collisionRadius

Field collisionRadius.

collisionViewAngle

protected float collisionViewAngle

Field collisionViewAngle.

separationDistance

protected double separationDistance

Field separationDistance.

separationWeight

protected double separationWeight

Field separationWeight.

separationDistanceTarget

protected double separationDistanceTarget

Field separationDistanceTarget.

separationNearRadiusTarget

protected double separationNearRadiusTarget

Field separationNearRadiusTarget.

separationFarRadiusTarget

protected double separationFarRadiusTarget

Field separationFarRadiusTarget.

stayInEnvironment

protected boolean stayInEnvironment

Field stayInEnvironment.

allowedEnvironments

protected String allowedEnvironments

Field allowedEnvironments.

flockWeightAlignment

protected double flockWeightAlignment

Field flockWeightAlignment.

flockWeightSeparation

protected double flockWeightSeparation

Field flockWeightSeparation.

flockWeightCohesion

protected double flockWeightCohesion

Field flockWeightCohesion.

flockInfluenceRange

protected double flockInfluenceRange

Field flockInfluenceRange.

corpseStaysInFlock

protected boolean corpseStaysInFlock

Field corpseStaysInFlock.

pickupDropOnDeath

protected boolean pickupDropOnDeath

Field pickupDropOnDeath.

armor

protected String[] armor

Field armor.

deathAnimationTime

protected double deathAnimationTime

Field deathAnimationTime.

despawnAnimationTime

protected float despawnAnimationTime

Field despawnAnimationTime.

deathInteraction

protected AssetHolder deathInteraction

Field deathInteraction.

avoidanceMode

protected Role.AvoidanceMode avoidanceMode

Field avoidanceMode.

disableDamageFlock

protected boolean disableDamageFlock

Field disableDamageFlock.

spawnParticles

protected String spawnParticles

Field spawnParticles.

spawnParticleOffset

protected double[] spawnParticleOffset

Field spawnParticleOffset.

spawnViewDistance

protected double spawnViewDistance

Field spawnViewDistance.

inventorySlots

protected int inventorySlots

Field inventorySlots.

hotbarSlots

protected int hotbarSlots

Field hotbarSlots.

offHandSlots

protected int offHandSlots

Field offHandSlots.

busyStates

protected Int2ObjectMap busyStates

Field busyStates.

hotbar

final String[] hotbar

Field hotbar.

offHand

final String[] offHand

Field offHand.

mc

final String mc

Field mc.

factory

final BuilderFactory factory

Field factory.

builder

final BuilderMotionControllerBase builder

Field builder.

stateEvaluator

final StateEvaluator stateEvaluator

Field stateEvaluator.

builderInfo

final BuilderInfo builderInfo

Field builderInfo.

result

final SpawnTestResult result

Field result.

zero

final Vector3d zero

Field zero.

index

final int index

Field index.

val

final String val

Field val.

groupName

final String groupName

Field groupName.

npcModule

final NPCPlugin npcModule

Field npcModule.

spawnTypes

final String[] spawnTypes

Field spawnTypes.

allowedTypes

final String[] allowedTypes

Field allowedTypes.

Method Detail

BuilderRole

public public BuilderRole ()

Method BuilderRole.

BuilderCombatConfig

public new BuilderCombatConfig (BalanceAsset.CHILD_ASSET_CODEC, BalanceAsset.VALIDATOR_CACHE.getValidator()

Method BuilderCombatConfig.

Parameters:
BalanceAsset.CHILD_ASSET_CODEC BalanceAsset.CHILD_ASSET_CODEC
BalanceAsset.VALIDATOR_CACHE.getValidator( BalanceAsset.VALIDATOR_CACHE.getValidator(

getShortDescription

public String getShortDescription ()

Method getShortDescription.

getLongDescription

public String getLongDescription ()

Method getLongDescription.

getBuilderDescriptorState

public BuilderDescriptorState getBuilderDescriptorState ()

Method getBuilderDescriptorState.

build

public Role build (@Nonnull final BuilderSupport builderSupport)

Method build.

Parameters:
@Nonnull final BuilderSupport builderSupport

validate

public boolean validate (final String configName, @Nonnull final NPCLoadTimeValidationHelper validationHelper, @Nonnull final ExecutionContext context, final Scope globalScope, @Nonnull final List errors)

Method validate.

Parameters:
final String configName
@Nonnull final NPCLoadTimeValidationHelper validationHelper
@Nonnull final ExecutionContext context
final Scope globalScope
@Nonnull final List errors

readConfig

public BuilderRole readConfig (@Nonnull final JsonElement data)

Method readConfig.

Parameters:
@Nonnull final JsonElement data

items

public Hotbar items (e.g. primary weapon, secondary weapon, etc)

Method items.

Parameters:
secondary weapon
etc etc

slot

public item slot (-1 is empty)

Method slot.

Parameters:
-1 is empty

to

public belongs to (often species related)

Method to.

Parameters:
often species related

BuilderValidationHelper

public new BuilderValidationHelper (this.fileName, null, this.internalReferenceResolver, null, null, this.extraInfo, this.evaluators, this.readErrors)

Method BuilderValidationHelper.

Parameters:
this.fileName this.fileName
null null
this.internalReferenceResolver this.internalReferenceResolver
this.extraInfo this.extraInfo
this.evaluators this.evaluators
this.readErrors this.readErrors

InstructionContextHelper

public new InstructionContextHelper (InstructionType.StateTransitions)

Method InstructionContextHelper.

Parameters:
InstructionType.StateTransitions InstructionType.StateTransitions

getIdentifier

public String getIdentifier ()

Method getIdentifier.

canSpawn

Method canSpawn.

Parameters:
@Nonnull final SpawningContext context

category

public Class category ()

Method category.

getSpawnModelName

public String getSpawnModelName (final ExecutionContext context, final Scope modifierScope)

Method getSpawnModelName.

Parameters:
final ExecutionContext context
final Scope modifierScope

createModifierScope

public Scope createModifierScope (final ExecutionContext executionContext)

Method createModifierScope.

Parameters:
final ExecutionContext executionContext

createExecutionScope

public Scope createExecutionScope ()

Method createExecutionScope.

markNeedsReload

public void markNeedsReload ()

Method markNeedsReload.

getSpawnParticles

public String getSpawnParticles ()

Method getSpawnParticles.

getSpawnParticleOffset

public Vector3d getSpawnParticleOffset ()

Method getSpawnParticleOffset.

getSpawnViewDistance

public double getSpawnViewDistance ()

Method getSpawnViewDistance.

isEnabled

final boolean isEnabled (final ExecutionContext context)

Method isEnabled.

Parameters:
final ExecutionContext context

getMaxHealth

public int getMaxHealth (@Nonnull final BuilderSupport builderSupport)

Method getMaxHealth.

Parameters:
@Nonnull final BuilderSupport builderSupport

getDisplayNames

public String[] getDisplayNames ()

Method getDisplayNames.

getNameTranslationKey

public String getNameTranslationKey (final BuilderSupport support)

Method getNameTranslationKey.

Parameters:
final BuilderSupport support

getAppearance

public String getAppearance (@Nonnull final BuilderSupport builderSupport)

Method getAppearance.

Parameters:
@Nonnull final BuilderSupport builderSupport

isBreathesInAir

public boolean isBreathesInAir (final BuilderSupport support)

Method isBreathesInAir.

Parameters:
final BuilderSupport support

isBreathesInWater

public boolean isBreathesInWater (final BuilderSupport support)

Method isBreathesInWater.

Parameters:
final BuilderSupport support

getOpaqueBlockSet

public int getOpaqueBlockSet ()

Method getOpaqueBlockSet.

getInertia

public double getInertia ()

Method getInertia.

getKnockbackScale

public double getKnockbackScale ()

Method getKnockbackScale.

getHotbarItems

public String[] getHotbarItems (@Nonnull final BuilderSupport support)

Method getHotbarItems.

Parameters:
@Nonnull final BuilderSupport support

getOffHandItems

public String[] getOffHandItems (@Nonnull final BuilderSupport support)

Method getOffHandItems.

Parameters:
@Nonnull final BuilderSupport support

getInventoryItemsDropList

public String getInventoryItemsDropList (@Nonnull final BuilderSupport support)

Method getInventoryItemsDropList.

Parameters:
@Nonnull final BuilderSupport support

getArmor

public String[] getArmor ()

Method getArmor.

isPickupDropOnDeath

public boolean isPickupDropOnDeath ()

Method isPickupDropOnDeath.

getDropListId

public String getDropListId (@Nonnull final BuilderSupport builderSupport)

Method getDropListId.

Parameters:
@Nonnull final BuilderSupport builderSupport

getStartState

public String getStartState ()

Method getStartState.

getStartStateIndex

public int getStartStateIndex ()

Method getStartStateIndex.

getStartSubStateIndex

public int getStartSubStateIndex ()

Method getStartSubStateIndex.

getCollisionDistance

public double getCollisionDistance ()

Method getCollisionDistance.

getCollisionForceFalloff

public double getCollisionForceFalloff ()

Method getCollisionForceFalloff.

isAvoidingEntities

public boolean isAvoidingEntities ()

Method isAvoidingEntities.

getAvoidanceMode

public Role.AvoidanceMode getAvoidanceMode ()

Method getAvoidanceMode.

getCollisionRadius

public double getCollisionRadius ()

Method getCollisionRadius.

getSeparationDistance

public double getSeparationDistance ()

Method getSeparationDistance.

getSeparationWeight

public double getSeparationWeight ()

Method getSeparationWeight.

getSeparationDistanceTarget

public double getSeparationDistanceTarget ()

Method getSeparationDistanceTarget.

getSeparationNearRadiusTarget

public double getSeparationNearRadiusTarget ()

Method getSeparationNearRadiusTarget.

getSeparationFarRadiusTarget

public double getSeparationFarRadiusTarget ()

Method getSeparationFarRadiusTarget.

isApplySeparation

public boolean isApplySeparation (final BuilderSupport support)

Method isApplySeparation.

Parameters:
final BuilderSupport support

isStayingInEnvironment

public boolean isStayingInEnvironment ()

Method isStayingInEnvironment.

getAllowedEnvironments

public String getAllowedEnvironments ()

Method getAllowedEnvironments.

getEntityAvoidanceStrength

public double getEntityAvoidanceStrength ()

Method getEntityAvoidanceStrength.

getFlockSpawnTypes

public String[] getFlockSpawnTypes (@Nonnull final BuilderSupport support)

Method getFlockSpawnTypes.

Parameters:
@Nonnull final BuilderSupport support

isFlockSpawnTypeRandom

public boolean isFlockSpawnTypeRandom (@Nonnull final BuilderSupport support)

Method isFlockSpawnTypeRandom.

Parameters:
@Nonnull final BuilderSupport support

getFlockAllowedRoles

public String[] getFlockAllowedRoles (@Nonnull final BuilderSupport support)

Method getFlockAllowedRoles.

Parameters:
@Nonnull final BuilderSupport support

isCanLeadFlock

public boolean isCanLeadFlock (@Nonnull final BuilderSupport support)

Method isCanLeadFlock.

Parameters:
@Nonnull final BuilderSupport support

getFlockWeightAlignment

public double getFlockWeightAlignment ()

Method getFlockWeightAlignment.

getFlockWeightSeparation

public double getFlockWeightSeparation ()

Method getFlockWeightSeparation.

getFlockWeightCohesion

public double getFlockWeightCohesion ()

Method getFlockWeightCohesion.

getFlockInfluenceRange

public double getFlockInfluenceRange ()

Method getFlockInfluenceRange.

getDebugFlags

public EnumSet getDebugFlags ()

Method getDebugFlags.

getCollisionViewAngle

public float getCollisionViewAngle ()

Method getCollisionViewAngle.

getBalanceAsset

public String getBalanceAsset (@Nonnull final BuilderSupport support)

Method getBalanceAsset.

Parameters:
@Nonnull final BuilderSupport support

getDeathAnimationTime

public double getDeathAnimationTime ()

Method getDeathAnimationTime.

getDeathInteraction

public String getDeathInteraction (@Nonnull final BuilderSupport builderSupport)

Method getDeathInteraction.

Parameters:
@Nonnull final BuilderSupport builderSupport

getDespawnAnimationTime

public float getDespawnAnimationTime ()

Method getDespawnAnimationTime.

isDisableDamageFlock

public boolean isDisableDamageFlock ()

Method isDisableDamageFlock.

getDisableDamageGroups

public int[] getDisableDamageGroups (@Nonnull final BuilderSupport support)

Method getDisableDamageGroups.

Parameters:
@Nonnull final BuilderSupport support

isInvulnerable

public boolean isInvulnerable (final BuilderSupport support)

Method isInvulnerable.

Parameters:
final BuilderSupport support

getInventorySlots

public int getInventorySlots ()

Method getInventorySlots.

getHotbarSlots

public int getHotbarSlots ()

Method getHotbarSlots.

getOffHandSlots

public int getOffHandSlots ()

Method getOffHandSlots.

getDefaultOffHandSlot

public byte getDefaultOffHandSlot (@Nonnull final BuilderSupport support)

Method getDefaultOffHandSlot.

Parameters:
@Nonnull final BuilderSupport support

getBusyStates

public Int2ObjectMap getBusyStates ()

Method getBusyStates.

getDefaultPlayerAttitude

public Attitude getDefaultPlayerAttitude (@Nonnull final BuilderSupport support)

Method getDefaultPlayerAttitude.

Parameters:
@Nonnull final BuilderSupport support

getDefaultNPCAttitude

public Attitude getDefaultNPCAttitude (@Nonnull final BuilderSupport support)

Method getDefaultNPCAttitude.

Parameters:
@Nonnull final BuilderSupport support

getAttitudeGroup

public int getAttitudeGroup (@Nonnull final BuilderSupport support)

Method getAttitudeGroup.

Parameters:
@Nonnull final BuilderSupport support

getItemAttitudeGroup

public int getItemAttitudeGroup (@Nonnull final BuilderSupport support)

Method getItemAttitudeGroup.

Parameters:
@Nonnull final BuilderSupport support

isCorpseStaysInFlock

public boolean isCorpseStaysInFlock ()

Method isCorpseStaysInFlock.

getMotionControllerMap

public MotionController> getMotionControllerMap (@Nonnull final BuilderSupport support)

Method getMotionControllerMap.

Parameters:
@Nonnull final BuilderSupport support

getInitialMotionController

public String getInitialMotionController (@Nonnull final BuilderSupport support)

Method getInitialMotionController.

Parameters:
@Nonnull final BuilderSupport support

getInstructionList

public List getInstructionList (@Nonnull final BuilderSupport support)

Method getInstructionList.

Parameters:
@Nonnull final BuilderSupport support

getInteractionInstruction

public Instruction getInteractionInstruction (@Nonnull final BuilderSupport support)

Method getInteractionInstruction.

Parameters:
@Nonnull final BuilderSupport support

getDeathInstruction

public Instruction getDeathInstruction (@Nonnull final BuilderSupport support)

Method getDeathInstruction.

Parameters:
@Nonnull final BuilderSupport support

getStateTransitionController

public StateTransitionController getStateTransitionController (@Nonnull final BuilderSupport support)

Method getStateTransitionController.

Parameters:
@Nonnull final BuilderSupport support

registerStateEvaluator

public void registerStateEvaluator (@Nonnull final BuilderSupport support)

Method registerStateEvaluator.

Parameters:
@Nonnull final BuilderSupport support

getInteractionVars

public String> getInteractionVars (@Nonnull final BuilderSupport support)

Method getInteractionVars.

Parameters:
@Nonnull final BuilderSupport support

isMemory

public boolean isMemory (final ExecutionContext context)

Method isMemory.

Parameters:
final ExecutionContext context

getMemoriesCategory

public String getMemoriesCategory (final ExecutionContext context, final Scope modifierScope)

Method getMemoriesCategory.

Parameters:
final ExecutionContext context
final Scope modifierScope

getMemoriesNameOverride

public String getMemoriesNameOverride (final ExecutionContext context)

Method getMemoriesNameOverride.

Parameters:
final ExecutionContext context

getSpawnLockTime

public float getSpawnLockTime (final BuilderSupport support)

Method getSpawnLockTime.

Parameters:
final BuilderSupport support

runLoadTimeValidationHelper0

protected void runLoadTimeValidationHelper0 (final String configName, final NPCLoadTimeValidationHelper loadTimeValidationHelper, final ExecutionContext context, @Nonnull final List errors)

Method runLoadTimeValidationHelper0.

Parameters:
final String configName
final NPCLoadTimeValidationHelper loadTimeValidationHelper
final ExecutionContext context
@Nonnull final List errors

IllegalStateException

public new IllegalStateException (String.format("Invalid roles referenced for %s or %s", this.flockSpawnTypes.getName()

Method IllegalStateException.

Parameters:
String.format("Invalid roles referenced for %s or %s"
this.flockSpawnTypes.getName( this.flockSpawnTypes.getName(