Class SyncPlayerPreferences

java.lang.Object
com.hypixel.hytale.protocol.packets.player.SyncPlayerPreferences
All Implemented Interfaces:
Packet, ToServerPacket

public class SyncPlayerPreferences extends Object implements Packet, ToServerPacket
  • Field Details

    • PACKET_ID

      public static final int PACKET_ID
      See Also:
    • IS_COMPRESSED

      public static final boolean IS_COMPRESSED
      See Also:
    • 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:
    • showEntityMarkers

      public boolean showEntityMarkers
    • armorItemsPreferredPickupLocation

      @Nonnull public PickupLocation armorItemsPreferredPickupLocation
    • weaponAndToolItemsPreferredPickupLocation

      @Nonnull public PickupLocation weaponAndToolItemsPreferredPickupLocation
    • usableItemsItemsPreferredPickupLocation

      @Nonnull public PickupLocation usableItemsItemsPreferredPickupLocation
    • solidBlockItemsPreferredPickupLocation

      @Nonnull public PickupLocation solidBlockItemsPreferredPickupLocation
    • miscItemsPreferredPickupLocation

      @Nonnull public PickupLocation miscItemsPreferredPickupLocation
    • allowNPCDetection

      public boolean allowNPCDetection
    • respondToHit

      public boolean respondToHit
    • hideHelmet

      public boolean hideHelmet
    • hideCuirass

      public boolean hideCuirass
    • hideGauntlets

      public boolean hideGauntlets
    • hidePants

      public boolean hidePants
    • placeMode

      @Nonnull public PlaceMode placeMode
    • creativeInteractionDistance

      public int creativeInteractionDistance
    • showBuilderToolNotifications

      public boolean showBuilderToolNotifications
    • noPhysics

      public boolean noPhysics
    • eraserEnabled

      public boolean eraserEnabled
    • activateTriggerVolumes

      public boolean activateTriggerVolumes
    • voiceChat

      public boolean voiceChat
    • voiceInput

      public boolean voiceInput
    • voiceInputMode

      @Nonnull public VoiceInputMode voiceInputMode
  • Constructor Details

    • SyncPlayerPreferences

      public SyncPlayerPreferences()
    • SyncPlayerPreferences

      public SyncPlayerPreferences(boolean showEntityMarkers, @Nonnull PickupLocation armorItemsPreferredPickupLocation, @Nonnull PickupLocation weaponAndToolItemsPreferredPickupLocation, @Nonnull PickupLocation usableItemsItemsPreferredPickupLocation, @Nonnull PickupLocation solidBlockItemsPreferredPickupLocation, @Nonnull PickupLocation miscItemsPreferredPickupLocation, boolean allowNPCDetection, boolean respondToHit, boolean hideHelmet, boolean hideCuirass, boolean hideGauntlets, boolean hidePants, @Nonnull PlaceMode placeMode, int creativeInteractionDistance, boolean showBuilderToolNotifications, boolean noPhysics, boolean eraserEnabled, boolean activateTriggerVolumes, boolean voiceChat, boolean voiceInput, @Nonnull VoiceInputMode voiceInputMode)
    • SyncPlayerPreferences

      public SyncPlayerPreferences(@Nonnull SyncPlayerPreferences other)
  • Method Details

    • getId

      public int getId()
      Description copied from interface: Packet
      Returns the unique packet ID.
      Specified by:
      getId in interface Packet
    • getChannel

      public NetworkChannel getChannel()
      Description copied from interface: Packet
      Returns the channel this packet should be sent on.
      Specified by:
      getChannel in interface Packet
    • 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.
    • getShowEntityMarkers

      public static boolean getShowEntityMarkers(MemorySegment mem)
    • getShowEntityMarkers

      public static boolean getShowEntityMarkers(MemorySegment mem, int offset)
    • getArmorItemsPreferredPickupLocation

      public static PickupLocation getArmorItemsPreferredPickupLocation(MemorySegment mem)
    • getArmorItemsPreferredPickupLocation

      public static PickupLocation getArmorItemsPreferredPickupLocation(MemorySegment mem, int offset)
    • getWeaponAndToolItemsPreferredPickupLocation

      public static PickupLocation getWeaponAndToolItemsPreferredPickupLocation(MemorySegment mem)
    • getWeaponAndToolItemsPreferredPickupLocation

      public static PickupLocation getWeaponAndToolItemsPreferredPickupLocation(MemorySegment mem, int offset)
    • getUsableItemsItemsPreferredPickupLocation

      public static PickupLocation getUsableItemsItemsPreferredPickupLocation(MemorySegment mem)
    • getUsableItemsItemsPreferredPickupLocation

      public static PickupLocation getUsableItemsItemsPreferredPickupLocation(MemorySegment mem, int offset)
    • getSolidBlockItemsPreferredPickupLocation

      public static PickupLocation getSolidBlockItemsPreferredPickupLocation(MemorySegment mem)
    • getSolidBlockItemsPreferredPickupLocation

      public static PickupLocation getSolidBlockItemsPreferredPickupLocation(MemorySegment mem, int offset)
    • getMiscItemsPreferredPickupLocation

      public static PickupLocation getMiscItemsPreferredPickupLocation(MemorySegment mem)
    • getMiscItemsPreferredPickupLocation

      public static PickupLocation getMiscItemsPreferredPickupLocation(MemorySegment mem, int offset)
    • getAllowNPCDetection

      public static boolean getAllowNPCDetection(MemorySegment mem)
    • getAllowNPCDetection

      public static boolean getAllowNPCDetection(MemorySegment mem, int offset)
    • getRespondToHit

      public static boolean getRespondToHit(MemorySegment mem)
    • getRespondToHit

      public static boolean getRespondToHit(MemorySegment mem, int offset)
    • getHideHelmet

      public static boolean getHideHelmet(MemorySegment mem)
    • getHideHelmet

      public static boolean getHideHelmet(MemorySegment mem, int offset)
    • getHideCuirass

      public static boolean getHideCuirass(MemorySegment mem)
    • getHideCuirass

      public static boolean getHideCuirass(MemorySegment mem, int offset)
    • getHideGauntlets

      public static boolean getHideGauntlets(MemorySegment mem)
    • getHideGauntlets

      public static boolean getHideGauntlets(MemorySegment mem, int offset)
    • getHidePants

      public static boolean getHidePants(MemorySegment mem)
    • getHidePants

      public static boolean getHidePants(MemorySegment mem, int offset)
    • getPlaceMode

      public static PlaceMode getPlaceMode(MemorySegment mem)
    • getPlaceMode

      public static PlaceMode getPlaceMode(MemorySegment mem, int offset)
    • getCreativeInteractionDistance

      public static int getCreativeInteractionDistance(MemorySegment mem)
    • getCreativeInteractionDistance

      public static int getCreativeInteractionDistance(MemorySegment mem, int offset)
    • getShowBuilderToolNotifications

      public static boolean getShowBuilderToolNotifications(MemorySegment mem)
    • getShowBuilderToolNotifications

      public static boolean getShowBuilderToolNotifications(MemorySegment mem, int offset)
    • getNoPhysics

      public static boolean getNoPhysics(MemorySegment mem)
    • getNoPhysics

      public static boolean getNoPhysics(MemorySegment mem, int offset)
    • getEraserEnabled

      public static boolean getEraserEnabled(MemorySegment mem)
    • getEraserEnabled

      public static boolean getEraserEnabled(MemorySegment mem, int offset)
    • getActivateTriggerVolumes

      public static boolean getActivateTriggerVolumes(MemorySegment mem)
    • getActivateTriggerVolumes

      public static boolean getActivateTriggerVolumes(MemorySegment mem, int offset)
    • getVoiceChat

      public static boolean getVoiceChat(MemorySegment mem)
    • getVoiceChat

      public static boolean getVoiceChat(MemorySegment mem, int offset)
    • getVoiceInput

      public static boolean getVoiceInput(MemorySegment mem)
    • getVoiceInput

      public static boolean getVoiceInput(MemorySegment mem, int offset)
    • getVoiceInputMode

      public static VoiceInputMode getVoiceInputMode(MemorySegment mem)
    • getVoiceInputMode

      public static VoiceInputMode getVoiceInputMode(MemorySegment mem, int offset)
    • toObject

      public static SyncPlayerPreferences toObject(MemorySegment mem)
    • toObject

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

      public static SyncPlayerPreferences toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one SyncPlayerPreferences 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)
      Description copied from interface: Packet
      Writes this packet at offset and returns the number of bytes written, which callers rely on being exactly Packet.computeSize(). The framed write path reserves and length-prefixes on that figure before serializing, so a shorter or longer write corrupts the frame rather than failing.
      Specified by:
      serialize in interface Packet
    • computeSize

      public int computeSize()
      Description copied from interface: Packet
      Compute the exact number of bytes needed to serialize this packet.
      Specified by:
      computeSize in interface Packet
    • clone

      public SyncPlayerPreferences clone()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object