类 ParticleEmitterInfo

java.lang.Object
mod.chloeprime.aaaparticles.api.common.ParticleEmitterInfo
所有已实现的接口:
Cloneable
直接已知子类:
S2CAddParticle

public class ParticleEmitterInfo extends Object implements Cloneable
  • 字段详细资料

    • effek

      public final net.minecraft.resources.ResourceLocation effek
    • emitter

      public final net.minecraft.resources.ResourceLocation emitter
    • flags

      protected int flags
    • x

      protected double x
    • y

      protected double y
    • z

      protected double z
    • rotX

      protected float rotX
    • rotY

      protected float rotY
    • rotZ

      protected float rotZ
    • scaleX

      protected float scaleX
    • scaleY

      protected float scaleY
    • scaleZ

      protected float scaleZ
    • speed

      protected float speed
    • esX

      protected double esX
    • esY

      protected double esY
    • esZ

      protected double esZ
    • boundEntity

      protected int boundEntity
    • parameters

      protected final List<DynamicParameter> parameters
    • triggers

      protected final it.unimi.dsi.fastutil.ints.IntList triggers
  • 构造器详细资料

    • ParticleEmitterInfo

      @Internal public ParticleEmitterInfo(net.minecraft.resources.ResourceLocation effek)
      另请参阅:
    • ParticleEmitterInfo

      @Internal public ParticleEmitterInfo(net.minecraft.resources.ResourceLocation effek, net.minecraft.resources.ResourceLocation emitter)
      另请参阅:
    • ParticleEmitterInfo

      public ParticleEmitterInfo(net.minecraft.network.FriendlyByteBuf buf)
  • 方法详细资料

    • create

      public static ParticleEmitterInfo create(net.minecraft.world.level.Level level, net.minecraft.resources.ResourceLocation location)
      Create a packet when on logic server, with an anonymous emitter that can't be referenced later.
    • create

      public static ParticleEmitterInfo create(net.minecraft.world.level.Level level, net.minecraft.resources.ResourceLocation location, net.minecraft.resources.ResourceLocation emitterName)
      Create a packet when on logic server, with a named emitter that can be referenced later.
    • clone

      public ParticleEmitterInfo clone()
      覆盖:
      clone 在类中 Object
    • hasEmitter

      public final boolean hasEmitter()
    • isPositionSet

      public final boolean isPositionSet()
    • isRotationSet

      public final boolean isRotationSet()
    • isScaleSet

      public final boolean isScaleSet()
    • isSpeedSet

      public final boolean isSpeedSet()
      从以下版本开始:
      2.0.0
    • hasParameters

      public final boolean hasParameters()
    • hasTriggers

      public final boolean hasTriggers()
    • hasBoundEntity

      public final boolean hasBoundEntity()
    • isEntitySpaceRelativePosSet

      public final boolean isEntitySpaceRelativePosSet()
      Set whether position and rotation are in entity space.
      返回:
      True if coordinates are in entity space, otherwise in world space.
    • usingEntityHeadSpace

      public final boolean usingEntityHeadSpace()
    • usingEntityVelocityAsRotation

      public final boolean usingEntityVelocityAsRotation()
    • position

      public ParticleEmitterInfo position(net.minecraft.world.phys.Vec3 pos)
      Set position.
      Will be relative position (in world space) if hasBoundEntity()
      参数:
      pos - Relative/Absolute position
      返回:
      self
      另请参阅:
    • position

      public ParticleEmitterInfo position(double x, double y, double z)
      Set position.
      Will be relative position if hasBoundEntity()
      参数:
      x - X position
      y - Y position
      z - Z position
      返回:
      self
    • rotation

      public ParticleEmitterInfo rotation(net.minecraft.world.phys.Vec2 rot)
      Set rotation in radians.
      Euler order is YXZ
      参数:
      rot - rotation vector(x, y), in radians
      返回:
      self
    • rotationFromForward

      public ParticleEmitterInfo rotationFromForward(net.minecraft.world.phys.Vec3 forward)
      Set rotation from a forward vector. This method considers +Z in Effekseer editor as forward.
      参数:
      forward - the forward vector, does not need to be normalized.
      返回:
      self
      从以下版本开始:
      2.1.0
    • rotationFromForward

      public ParticleEmitterInfo rotationFromForward(net.minecraft.world.phys.Vec3 forward, float rotZ)
      Set rotation from a forward vector. This method considers +Z in Effekseer editor as forward.
      参数:
      forward - the forward vector, does not need to be normalized.
      rotZ - Z axis rotation.
      返回:
      self
      从以下版本开始:
      2.1.0
    • rotation

      public ParticleEmitterInfo rotation(float x, float y, float z)
      Set rotation in radians.
      Euler order is YXZ.
      参数:
      x - X rotation, in radians
      y - Y rotation, in radians
      z - Z rotation, in radians
      返回:
      self
    • scale

      public ParticleEmitterInfo scale(float scale)
      Set scale of this emitter.
      参数:
      scale - scale value.
      返回:
      self
    • scale

      public ParticleEmitterInfo scale(float x, float y, float z)
      Set scale of this emitter.
      参数:
      x - X-axis scale value.
      y - y-axis scale value.
      z - Z-axis scale value.
      返回:
      self
    • speed

      public ParticleEmitterInfo speed(float speed)
      Set relative play speed of this emitter.

      WARNING: Effekseer effects are baked as 60 frames (by default), and changing this value to lower than 1 may look lagged / stepped.

      To fix this problem, you should set the play speed in your Effekseer editor as the slowest desired play speed, and call this method with the argument value not lesser than 1, up to your max desired relative play speed.

      WARNING: Do not set speed on long-time emitters. Emitters with relative speed other than 1 (default) will increase performance cost by time, until it has been stopped.

      参数:
      speed - relative speed.
      从以下版本开始:
      2.0.0
    • parameter

      public ParticleEmitterInfo parameter(int index, float value)
    • trigger

      public ParticleEmitterInfo trigger(int index)
    • bindOnEntity

      public ParticleEmitterInfo bindOnEntity(net.minecraft.world.entity.Entity entity)
    • entitySpaceRelativePosition

      public ParticleEmitterInfo entitySpaceRelativePosition(net.minecraft.world.phys.Vec3 pos)
      Set relative position in entity space.
      Will be relative position (in world space) if hasBoundEntity()
      参数:
      pos - Relative position in entity space
      返回:
      self
    • entitySpaceRelativePosition

      public ParticleEmitterInfo entitySpaceRelativePosition(double x, double y, double z)
      Set relative position in entity space.
      Will be relative position (in world space) if hasBoundEntity()
      参数:
      x - Relative X position in entity space
      y - Relative Y position in entity space
      z - Relative Z position in entity space
      返回:
      self
    • useEntityHeadSpace

      public ParticleEmitterInfo useEntityHeadSpace()
    • useEntityHeadSpace

      public ParticleEmitterInfo useEntityHeadSpace(boolean value)
    • useEntityVelocityAsRotation

      public ParticleEmitterInfo useEntityVelocityAsRotation()
      Set whether to use bound entity's velocity direction as the emitter's rotation.
      返回:
      self
      从以下版本开始:
      2.1.0
    • useEntityVelocityAsRotation

      public ParticleEmitterInfo useEntityVelocityAsRotation(boolean value)
      Set whether to use bound entity's velocity direction as the emitter's rotation. Useful for effeks bound to projectiles.
      参数:
      value - whether this flag is set to true
      返回:
      self
      从以下版本开始:
      2.1.0
    • position

      public final net.minecraft.world.phys.Vec3 position()
    • rotation

      public final net.minecraft.world.phys.Vec3 rotation()
    • scale

      public final net.minecraft.world.phys.Vec3 scale()
    • speed

      public final float speed()
      从以下版本开始:
      2.0.0
    • getBoundEntity

      public Optional<net.minecraft.world.entity.Entity> getBoundEntity(net.minecraft.world.level.Level level)
    • encode

      public void encode(net.minecraft.network.FriendlyByteBuf buf)
    • spawnInWorld

      @Internal public void spawnInWorld(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player)
    • copyTo

      @Internal public void copyTo(ParticleEmitterInfo target)