mirror of https://github.com/FabricMC/yarn.git
Improve ProjectileEntity (#2715)
* Improve ProjectileEntity * setProperties -> setVelocity * Update speed javadoc * Update divergence javadoc Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
dcdcf04575
commit
f51ddcde21
|
@ -3,13 +3,23 @@ CLASS net/minecraft/class_1676 net/minecraft/entity/projectile/ProjectileEntity
|
|||
FIELD field_23740 leftOwner Z
|
||||
FIELD field_28646 shot Z
|
||||
FIELD field_33399 owner Lnet/minecraft/class_1297;
|
||||
METHOD method_24919 setProperties (Lnet/minecraft/class_1297;FFFFF)V
|
||||
ARG 1 user
|
||||
METHOD method_24919 setVelocity (Lnet/minecraft/class_1297;FFFFF)V
|
||||
COMMENT Sets velocity and updates rotation accordingly.
|
||||
ARG 1 shooter
|
||||
COMMENT the entity who shot this projectile; used to add the shooter's velocity
|
||||
COMMENT to this projectile
|
||||
ARG 2 pitch
|
||||
COMMENT the pitch
|
||||
ARG 3 yaw
|
||||
COMMENT the yaw
|
||||
ARG 4 roll
|
||||
ARG 5 modifierZ
|
||||
ARG 6 modifierXYZ
|
||||
COMMENT the roll
|
||||
ARG 5 speed
|
||||
COMMENT the speed
|
||||
ARG 6 divergence
|
||||
COMMENT the fuzziness added to the direction; player usages have 1.0 and other
|
||||
COMMENT mobs/tools have higher values; some mobs have difficulty-adjusted
|
||||
COMMENT values
|
||||
METHOD method_24920 onBlockHit (Lnet/minecraft/class_3965;)V
|
||||
ARG 1 blockHitResult
|
||||
METHOD method_24921 getOwner ()Lnet/minecraft/class_1297;
|
||||
|
@ -31,10 +41,24 @@ CLASS net/minecraft/class_1676 net/minecraft/entity/projectile/ProjectileEntity
|
|||
METHOD method_7454 onEntityHit (Lnet/minecraft/class_3966;)V
|
||||
ARG 1 entityHitResult
|
||||
METHOD method_7485 setVelocity (DDDFF)V
|
||||
COMMENT Sets velocity and updates rotation accordingly.
|
||||
COMMENT
|
||||
COMMENT <p>The velocity and rotation will be set to the same direction.
|
||||
COMMENT
|
||||
COMMENT <p>The direction is calculated as follows: Based on the direction vector
|
||||
COMMENT {@code (x, y, z)}, a random vector is added, then multiplied by the
|
||||
COMMENT {@code speed}.
|
||||
ARG 1 x
|
||||
COMMENT the X component of the direction vector
|
||||
ARG 3 y
|
||||
COMMENT the Y component of the direction vector
|
||||
ARG 5 z
|
||||
COMMENT the Z component of the direction vector
|
||||
ARG 7 speed
|
||||
COMMENT the speed
|
||||
ARG 8 divergence
|
||||
COMMENT the fuzziness added to the direction; player usages have 1.0 and other
|
||||
COMMENT mobs/tools have higher values; some mobs have difficulty-adjusted
|
||||
COMMENT values
|
||||
METHOD method_7488 onCollision (Lnet/minecraft/class_239;)V
|
||||
ARG 1 hitResult
|
||||
|
|
Loading…
Reference in New Issue