public class ActionDropItem extends ActionWithDelay
Class ActionDropItem. Provides actiondropitem functionality for the Hytale server.
java.lang.Object > ActionWithDelay > ActionDropItem
Field Summary
throwSpeed
protected
float
throwSpeed
Field throwSpeed.
distance
final
double[]
distance
Field distance.
dropSector
final
double[]
dropSector
Field dropSector.
modelComponent
final
ModelComponent
modelComponent
Field modelComponent.
eyeHeight
final
float
eyeHeight
Field eyeHeight.
height
final
float
height
Field height.
itemModule
final
ItemModule
itemModule
Field itemModule.
randomItemsToDrop
final
List
randomItemsToDrop
Field randomItemsToDrop.
drop
final
ItemStack
drop
Field drop.
transformComponent
final
TransformComponent
transformComponent
Field transformComponent.
headRotationComponent
final
HeadRotation
headRotationComponent
Field headRotationComponent.
heading
final
float
heading
Field heading.
Method Detail
ActionDropItem
public
public
ActionDropItem
(@Nonnull final BuilderActionDropItem builder, @Nonnull final BuilderSupport support)
Method ActionDropItem.
- Parameters:
@Nonnull final BuilderActionDropItembuilder@Nonnull final BuilderSupportsupport
canExecute
public
boolean
canExecute
(@Nonnull final Ref ref, @Nonnull final Role role, final InfoProvider sensorInfo, final double dt, @Nonnull final Store store)
Method canExecute.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerolefinal InfoProvidersensorInfofinal doubledt@Nonnull final Storestore
execute
public
boolean
execute
(@Nonnull final Ref ref, @Nonnull final Role role, final InfoProvider sensorInfo, final double dt, @Nonnull final Store store)
Method execute.
- Parameters:
@Nonnull final Refref@Nonnull final Rolerolefinal InfoProvidersensorInfofinal doubledt@Nonnull final Storestore
pickDistance
protected
double
pickDistance
()
Method pickDistance.
newDirection
protected
void
newDirection
(@Nonnull final Ref ref, final double distance, final double height, @Nonnull final ComponentAccessor componentAccessor)
Method newDirection.
- Parameters:
@Nonnull final Refreffinal doubledistancefinal doubleheight@Nonnull final ComponentAccessorcomponentAccessor
IllegalStateException
public
new
IllegalStateException
(String.format("Error in computing pitch with distance %s, height %s, and speed %s that was not caught in validation", distance, height, this.throwSpeed)
Method IllegalStateException.
- Parameters:
height%sand speed %s that was not caught invalidation"distancedistanceheightheightthis.throwSpeedthis.throwSpeed