Class ProjectileComponent
java.lang.Object
com.hypixel.hytale.server.core.entity.entities.ProjectileComponent
- All Implemented Interfaces:
Component<EntityStore>,Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate floatstatic final BuilderCodec<ProjectileComponent> private UUIDprivate doubleprivate static final doubleprivate booleanprivate Vector3dprivate Projectileprivate Stringprivate SimplePhysicsProviderFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyBrokenPenalty(float penalty) static Holder<EntityStore> assembleDefaultProjectile(TimeResource time, String projectileAssetName, Vector3d position, Vector3f rotation) protected voidbounceHandler(Vector3d position, ComponentAccessor<EntityStore> componentAccessor) clone()static voidcomputeStartOffset(boolean pitchAdjust, double verticalCenterShot, double horizontalCenterShot, double depthShot, float yaw, float pitch, Vector3d offset) booleanconsumeDeadTimer(float dt) protected voidimpactHandler(Ref<EntityStore> ref, Vector3d position, Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) booleanvoidinitializePhysics(BoundingBox boundingBox) booleanvoidonProjectileBounce(Vector3d position, ComponentAccessor<EntityStore> componentAccessor) voidonProjectileDeath(Ref<EntityStore> ref, Vector3d position, CommandBuffer<EntityStore> commandBuffer) private voidonProjectileHitEvent(Ref<EntityStore> ref, Vector3d position, Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) private voidonProjectileMissEvent(Vector3d position, ComponentAccessor<EntityStore> componentAccessor) voidshoot(Holder<EntityStore> holder, UUID creatorUuid, double x, double y, double z, float yaw, float pitch) 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
-
CODEC
-
DEFAULT_DESPAWN_SECONDS
private static final double DEFAULT_DESPAWN_SECONDS- See Also:
-
simplePhysicsProvider
-
appearance
-
projectile
-
projectileAssetName
-
brokenDamageModifier
private float brokenDamageModifier -
deadTimer
private double deadTimer -
creatorUuid
-
haveHit
private boolean haveHit -
lastBouncePosition
-
-
Constructor Details
-
ProjectileComponent
private ProjectileComponent() -
ProjectileComponent
-
ProjectileComponent
-
-
Method Details
-
getComponentType
-
assembleDefaultProjectile
@Nonnull public static Holder<EntityStore> assembleDefaultProjectile(@Nonnull TimeResource time, @Nonnull String projectileAssetName, @Nonnull Vector3d position, @Nonnull Vector3f rotation) -
initialize
public boolean initialize() -
initializePhysics
-
onProjectileBounce
public void onProjectileBounce(@Nonnull Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onProjectileHitEvent
private void onProjectileHitEvent(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
consumeDeadTimer
public boolean consumeDeadTimer(float dt) -
bounceHandler
protected void bounceHandler(@Nonnull Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
impactHandler
protected void impactHandler(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nullable Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onProjectileMissEvent
private void onProjectileMissEvent(@Nonnull Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onProjectileDeath
public void onProjectileDeath(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nonnull CommandBuffer<EntityStore> commandBuffer) -
shoot
public void shoot(@Nonnull Holder<EntityStore> holder, @Nonnull UUID creatorUuid, double x, double y, double z, float yaw, float pitch) -
computeStartOffset
public static void computeStartOffset(boolean pitchAdjust, double verticalCenterShot, double horizontalCenterShot, double depthShot, float yaw, float pitch, @Nonnull Vector3d offset) -
isOnGround
public boolean isOnGround() -
getProjectile
-
getAppearance
-
getProjectileAssetName
-
getSimplePhysicsProvider
-
applyBrokenPenalty
public void applyBrokenPenalty(float penalty) -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Overrides:
clonein classObject
-