Class ProjectileConfig

java.lang.Object
com.hypixel.hytale.protocol.ProjectileConfig

public class ProjectileConfig extends Object
  • Field Details

    • NULLABLE_BIT_FIELD_SIZE

      public static final int NULLABLE_BIT_FIELD_SIZE
      See Also:
    • FIXED_BLOCK_SIZE

      public static final int FIXED_BLOCK_SIZE
      See Also:
    • VARIABLE_FIELD_COUNT

      public static final int VARIABLE_FIELD_COUNT
      See Also:
    • VARIABLE_BLOCK_START

      public static final int VARIABLE_BLOCK_START
      See Also:
    • MAX_SIZE

      public static final int MAX_SIZE
      See Also:
    • physicsConfig

      @Nullable public PhysicsConfig physicsConfig
    • model

      @Nullable public Model model
    • launchForce

      public double launchForce
    • spawnOffset

      @Nullable public org.joml.Vector3fc spawnOffset
    • rotationOffset

      @Nullable public Direction rotationOffset
    • rotateSpawnOffsetByPitch

      public boolean rotateSpawnOffsetByPitch
    • rotateSpawnOffsetByYaw

      public boolean rotateSpawnOffsetByYaw
    • interactions

      @Nullable public Map<InteractionType, Integer> interactions
    • launchLocalSoundEventIndex

      public int launchLocalSoundEventIndex
    • launchWorldSoundEventIndex

      public int launchWorldSoundEventIndex
    • projectileSoundEventIndex

      public int projectileSoundEventIndex
    • minScale

      public float minScale
    • maxScale

      public float maxScale
  • Constructor Details

    • ProjectileConfig

      public ProjectileConfig()
    • ProjectileConfig

      public ProjectileConfig(@Nullable PhysicsConfig physicsConfig, @Nullable Model model, double launchForce, @Nullable org.joml.Vector3fc spawnOffset, @Nullable Direction rotationOffset, boolean rotateSpawnOffsetByPitch, boolean rotateSpawnOffsetByYaw, @Nullable Map<InteractionType, Integer> interactions, int launchLocalSoundEventIndex, int launchWorldSoundEventIndex, int projectileSoundEventIndex, float minScale, float maxScale)
    • ProjectileConfig

      public ProjectileConfig(@Nonnull ProjectileConfig other)
  • Method Details

    • requireBounds

      public static void requireBounds(MemorySegment mem, int offset)
      Checks that the fixed block fits. The per-field getters read without their own bound check, so call this once before reading fields out of an untrusted segment.
    • getPhysicsConfig

      @Nullable public static PhysicsConfig getPhysicsConfig(MemorySegment mem)
    • getPhysicsConfig

      @Nullable public static PhysicsConfig getPhysicsConfig(MemorySegment mem, int offset)
    • getModel

      @Nullable public static Model getModel(MemorySegment mem)
    • getModel

      @Nullable public static Model getModel(MemorySegment mem, int offset)
    • getLaunchForce

      public static double getLaunchForce(MemorySegment mem)
    • getLaunchForce

      public static double getLaunchForce(MemorySegment mem, int offset)
    • getSpawnOffset

      @Nullable public static org.joml.Vector3fc getSpawnOffset(MemorySegment mem)
    • getSpawnOffset

      @Nullable public static org.joml.Vector3fc getSpawnOffset(MemorySegment mem, int offset)
    • getRotationOffset

      @Nullable public static Direction getRotationOffset(MemorySegment mem)
    • getRotationOffset

      @Nullable public static Direction getRotationOffset(MemorySegment mem, int offset)
    • getRotateSpawnOffsetByPitch

      public static boolean getRotateSpawnOffsetByPitch(MemorySegment mem)
    • getRotateSpawnOffsetByPitch

      public static boolean getRotateSpawnOffsetByPitch(MemorySegment mem, int offset)
    • getRotateSpawnOffsetByYaw

      public static boolean getRotateSpawnOffsetByYaw(MemorySegment mem)
    • getRotateSpawnOffsetByYaw

      public static boolean getRotateSpawnOffsetByYaw(MemorySegment mem, int offset)
    • getInteractions

      @Nullable public static Map<InteractionType, Integer> getInteractions(MemorySegment mem)
    • getInteractions

      @Nullable public static Map<InteractionType, Integer> getInteractions(MemorySegment mem, int offset)
    • getLaunchLocalSoundEventIndex

      public static int getLaunchLocalSoundEventIndex(MemorySegment mem)
    • getLaunchLocalSoundEventIndex

      public static int getLaunchLocalSoundEventIndex(MemorySegment mem, int offset)
    • getLaunchWorldSoundEventIndex

      public static int getLaunchWorldSoundEventIndex(MemorySegment mem)
    • getLaunchWorldSoundEventIndex

      public static int getLaunchWorldSoundEventIndex(MemorySegment mem, int offset)
    • getProjectileSoundEventIndex

      public static int getProjectileSoundEventIndex(MemorySegment mem)
    • getProjectileSoundEventIndex

      public static int getProjectileSoundEventIndex(MemorySegment mem, int offset)
    • getMinScale

      public static float getMinScale(MemorySegment mem)
    • getMinScale

      public static float getMinScale(MemorySegment mem, int offset)
    • getMaxScale

      public static float getMaxScale(MemorySegment mem)
    • getMaxScale

      public static float getMaxScale(MemorySegment mem, int offset)
    • hasPhysicsConfig

      public static boolean hasPhysicsConfig(MemorySegment mem, int offset)
    • hasSpawnOffset

      public static boolean hasSpawnOffset(MemorySegment mem, int offset)
    • hasRotationOffset

      public static boolean hasRotationOffset(MemorySegment mem, int offset)
    • hasModel

      public static boolean hasModel(MemorySegment mem, int offset)
    • hasInteractions

      public static boolean hasInteractions(MemorySegment mem, int offset)
    • toObject

      public static ProjectileConfig toObject(MemorySegment mem)
    • toObject

      public static ProjectileConfig toObject(MemorySegment mem, int offset)
    • toObject

      public static ProjectileConfig toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one ProjectileConfig and reports the end of its encoding through the cursor. The variable block is decoded in field order against a running position, and each offset slot must name that position, so the fields decoded are the bytes walked.
    • serialize

      public int serialize(@Nonnull MemorySegment mem, int offset)
    • computeSize

      public int computeSize()
    • clone

      public ProjectileConfig clone()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object