Class EntitySpawnContext

java.lang.Object
org.geysermc.geyser.entity.spawn.EntitySpawnContext

public class EntitySpawnContext extends Object
  • Field Details

  • Constructor Details

    • EntitySpawnContext

      public EntitySpawnContext(GeyserSession session, EntityTypeDefinition<?> type, int javaId, UUID uuid)
    • EntitySpawnContext

      public EntitySpawnContext(GeyserSession session, EntityTypeDefinition<?> type, int entityId, float height, float width, long geyserId)
    • EntitySpawnContext

      public EntitySpawnContext(GeyserSession session, EntityTypeDefinition<?> definition, int javaId, UUID uuid, BedrockEntityDefinition bedrockEntityDefinition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, float pitch, float headYaw, float height, float width, float offset, @Nullable Long geyserId)
  • Method Details

    • fromPacket

      public static EntitySpawnContext fromPacket(GeyserSession session, EntityTypeDefinition<?> definition, org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.ClientboundAddEntityPacket packet)
    • inherited

      public static EntitySpawnContext inherited(GeyserSession session, EntityTypeDefinition<?> definition, Entity base, org.cloudburstmc.math.vector.Vector3f position)
    • callServerSpawnEvent

      public boolean callServerSpawnEvent()
      Returns:
      true if an entity should be spawned
    • callParrotEvent

      public boolean callParrotEvent(PlayerEntity player, int variant, boolean right)
    • geyserId

      public long geyserId()
    • session

      public GeyserSession session()
    • entityTypeDefinition

      public EntityTypeDefinition<?> entityTypeDefinition()
    • javaId

      public int javaId()
    • uuid

      public UUID uuid()
    • bedrockEntityDefinition

      public BedrockEntityDefinition bedrockEntityDefinition()
    • position

      public org.cloudburstmc.math.vector.Vector3f position()
    • motion

      public org.cloudburstmc.math.vector.Vector3f motion()
    • yaw

      public float yaw()
    • pitch

      public float pitch()
    • headYaw

      public float headYaw()
    • height

      public float height()
    • width

      public float width()
    • offset

      public float offset()
    • consumers

      public @Nullable Collection<Consumer<org.geysermc.geyser.api.entity.type.GeyserEntity>> consumers()
    • javaId

      public EntitySpawnContext javaId(int javaId)
      Returns:
      this.
    • bedrockEntityDefinition

      public EntitySpawnContext bedrockEntityDefinition(BedrockEntityDefinition bedrockEntityDefinition)
      Returns:
      this.
    • position

      public EntitySpawnContext position(org.cloudburstmc.math.vector.Vector3f position)
      Returns:
      this.
    • motion

      public EntitySpawnContext motion(org.cloudburstmc.math.vector.Vector3f motion)
      Returns:
      this.
    • yaw

      public EntitySpawnContext yaw(float yaw)
      Returns:
      this.
    • pitch

      public EntitySpawnContext pitch(float pitch)
      Returns:
      this.
    • headYaw

      public EntitySpawnContext headYaw(float headYaw)
      Returns:
      this.
    • height

      public EntitySpawnContext height(float height)
      Returns:
      this.
    • width

      public EntitySpawnContext width(float width)
      Returns:
      this.
    • offset

      public EntitySpawnContext offset(float offset)
      Returns:
      this.
    • geyserId

      public EntitySpawnContext geyserId(@Nullable Long geyserId)
      Returns:
      this.
    • consumers

      public EntitySpawnContext consumers(@Nullable Collection<Consumer<org.geysermc.geyser.api.entity.type.GeyserEntity>> consumers)
      Returns:
      this.