public class SpawnMinecartInteraction extends SimpleBlockInteraction
Class SpawnMinecartInteraction. Provides spawnminecartinteraction functionality for the Hytale server.
java.lang.Object > SimpleBlockInteraction > SpawnMinecartInteraction
Field Summary
modelId
private
String
modelId
Field modelId.
ref
final
Ref
ref
Field ref.
holder
final
Holder
holder
Field holder.
targetPosition
final
Vector3d
targetPosition
Field targetPosition.
rotation
final
Vector3f
rotation
Field rotation.
headRotation
final
HeadRotation
headRotation
Field headRotation.
chunk
final
WorldChunk
chunk
Field chunk.
block
final
BlockType
block
Field block.
blockRotation
final
int
blockRotation
Field blockRotation.
railConfig
final
RailConfig
railConfig
Field railConfig.
bounding
final
BlockBoundingBoxes.RotatedVariantBoxes
bounding
Field bounding.
model
final
Model
model
Field model.
points
final
RailPoint[]
points
Field points.
facingDir
final
Vector3d
facingDir
Field facingDir.
p
final
RailPoint
p
Field p.
p2
final
RailPoint
p2
Field p2.
point
final
Vector3d
point
Field point.
point2
final
Vector3d
point2
Field point2.
dir
final
Vector3d
dir
Field dir.
maxLength
final
double
maxLength
Field maxLength.
toPoint
final
Vector3d
toPoint
Field toPoint.
distance
final
double
distance
Field distance.
pointOnLine
final
Vector3d
pointOnLine
Field pointOnLine.
pointDist
final
double
pointDist
Field pointDist.
newYaw
final
float
newYaw
Field newYaw.
newPitch
final
float
newPitch
Field newPitch.
Method Detail
SpawnMinecartInteraction
public
public
SpawnMinecartInteraction
()
Method SpawnMinecartInteraction.
interactWithBlock
protected
void
interactWithBlock
(@Nonnull final World world, @Nonnull final CommandBuffer commandBuffer, @Nonnull final InteractionType type, @Nonnull final InteractionContext context, @Nullable final ItemStack itemInHand, @Nonnull final Vector3i targetBlock, @Nonnull final CooldownHandler cooldownHandler)
Method interactWithBlock.
- Parameters:
@Nonnull final Worldworld@Nonnull final CommandBuffercommandBuffer@Nonnull final InteractionTypetype@Nonnull final InteractionContextcontext@Nullable final ItemStackitemInHand@Nonnull final Vector3itargetBlock@Nonnull final CooldownHandlercooldownHandler
TransformComponent
public
new
TransformComponent
(targetPosition, rotation)
Method TransformComponent.
- Parameters:
targetPositiontargetPositionrotationrotation
PersistentModel
public
new
PersistentModel
(model.toReference()
Method PersistentModel.
- Parameters:
model.toReference(model.toReference(
ModelComponent
public
new
ModelComponent
(model)
Method ModelComponent.
- Parameters:
modelmodel
BoundingBox
public
new
BoundingBox
(model.getBoundingBox()
Method BoundingBox.
- Parameters:
model.getBoundingBox(model.getBoundingBox(
Interactions
public
new
Interactions
(this.cartInteractions)
Method Interactions.
- Parameters:
this.cartInteractionsthis.cartInteractions
MinecartComponent
public
new
MinecartComponent
((context.getHeldItem()
Method MinecartComponent.
- Parameters:
(context.getHeldItem((context.getHeldItem(
simulateInteractWithBlock
protected
void
simulateInteractWithBlock
(@Nonnull final InteractionType type, @Nonnull final InteractionContext context, @Nullable final ItemStack itemInHand, @Nonnull final World world, @Nonnull final Vector3i targetBlock)
Method simulateInteractWithBlock.
- Parameters:
@Nonnull final InteractionTypetype@Nonnull final InteractionContextcontext@Nullable final ItemStackitemInHand@Nonnull final Worldworld@Nonnull final Vector3itargetBlock
alignToRail
static
void
alignToRail
(@Nonnull final Vector3i targetBlock, @Nonnull final Vector3d target, @Nonnull final Vector3f rotation, final float yaw, @Nonnull final RailConfig config)
Method alignToRail.
- Parameters:
@Nonnull final Vector3itargetBlock@Nonnull final Vector3dtarget@Nonnull final Vector3frotationfinal floatyaw@Nonnull final RailConfigconfig