SetNoClip class

Пакет: com.hypixel.hytale.protocol.packets.player

Файл: com/hypixel/hytale/protocol/packets/player/SetNoClip.java

implements: Packet, ToClientPacket

Поля (7)

МодификаторыТипИмя
final int PACKET_ID
SetNoClip var1
long var2
SetNoClip var3
byte var3
var3
var3

Методы (19)

МодификаторыВозвратСигнатура
public SetNoClip cloneSetNoClip clone()
static boolean getEnabledboolean getEnabled(MemorySegment var0)
static boolean getEnabledboolean getEnabled(MemorySegment var0, int var1)
abstract return getEnabledreturn getEnabled(var0, 0)
static boolean getNotifyboolean getNotify(MemorySegment var0)
static boolean getNotifyboolean getNotify(MemorySegment var0, int var1)
abstract return getNotifyreturn getNotify(var0, 0)
if if(var1 < 0)
if if(var2 != null)
if if(this.enabled)
if if(this.notify)
if if(this == var1)
static void requireBoundsvoid requireBounds(MemorySegment var0, int var1)
abstract requireBounds requireBounds(var0, var1)
static SetNoClip toObjectSetNoClip toObject(MemorySegment var0)
static SetNoClip toObjectSetNoClip toObject(MemorySegment var0, int var1)
static SetNoClip toObjectSetNoClip toObject(MemorySegment var0, int var1, @Nullable ReadCursor var2)
abstract return toObjectreturn toObject(var0, 0, null)
abstract return toObjectreturn toObject(var0, var1, null)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.protocol.packets.player;

class="kw">import com.hypixel.hytale.protocol.NetworkChannel;
class="kw">import com.hypixel.hytale.protocol.Packet;
class="kw">import com.hypixel.hytale.protocol.ToClientPacket;
class="kw">import com.hypixel.hytale.protocol.io.PacketIO;
class="kw">import com.hypixel.hytale.protocol.io.ProtocolException;
class="kw">import com.hypixel.hytale.protocol.io.ReadCursor;
class="kw">import java.lang.foreign.MemorySegment;
class="kw">import java.util.Objects;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;

class="kw">public class SetNoClip class="kw">implements Packet, ToClientPacket {
   class="kw">public class="kw">static class="kw">final int PACKET_ID = 121;
   class="kw">public class="kw">static class="kw">final boolean IS_COMPRESSED = false;
   class="kw">public class="kw">static class="kw">final int NULLABLE_BIT_FIELD_SIZE = 0;
   class="kw">public class="kw">static class="kw">final int FIXED_BLOCK_SIZE = 1;
   class="kw">public class="kw">static class="kw">final int VARIABLE_FIELD_COUNT = 0;
   class="kw">public class="kw">static class="kw">final int VARIABLE_BLOCK_START = 1;
   class="kw">public class="kw">static class="kw">final int MAX_SIZE = 1;
   class="kw">public boolean enabled;
   class="kw">public boolean notify;

   @Override
   class="kw">public int getId() {
      class="kw">return 121;
   }

   @Override
   class="kw">public NetworkChannel getChannel() {
      class="kw">return NetworkChannel.Default;
   }

   class="kw">public SetNoClip() {
   }

   class="kw">public SetNoClip(boolean var1, boolean var2) {
      this.enabled = var1;
      this.notify = var2;
   }

   class="kw">public SetNoClip(@Nonnull SetNoClip var1) {
      this.enabled = var1.enabled;
      this.notify = var1.notify;
   }

   class="kw">public class="kw">static void requireBounds(MemorySegment var0, int var1) {
      if (var1 < 0) {
         throw ProtocolException.invalidOffset("SetNoClip", var1, (int)var0.byteSize());
      }

      long var2 = var1 + 1L;
      if (var2 > var0.byteSize()) {
         throw ProtocolException.bufferTooSmall("SetNoClip", (int)Math.min(var2, 2147483647L), (int)var0.byteSize());
      }
   }

   class="kw">public class="kw">static boolean getEnabled(MemorySegment var0) {
      class="kw">return getEnabled(var0, 0);
   }

   class="kw">public class="kw">static boolean getEnabled(MemorySegment var0, int var1) {
      class="kw">return (var0.get(PacketIO.PROTO_BYTE, var1 + 0) & 1) != 0;
   }

   class="kw">public class="kw">static boolean getNotify(MemorySegment var0) {
      class="kw">return getNotify(var0, 0);
   }

   class="kw">public class="kw">static boolean getNotify(MemorySegment var0, int var1) {
      class="kw">return (var0.get(PacketIO.PROTO_BYTE, var1 + 0) & 2) != 0;
   }

   class="kw">public class="kw">static SetNoClip toObject(MemorySegment var0) {
      class="kw">return toObject(var0, 0, null);
   }

   class="kw">public class="kw">static SetNoClip toObject(MemorySegment var0, int var1) {
      class="kw">return toObject(var0, var1, null);
   }

   class="kw">public class="kw">static SetNoClip toObject(MemorySegment var0, int var1, @Nullable ReadCursor var2) {
      requireBounds(var0, var1);
      SetNoClip var3 = new SetNoClip((var0.get(PacketIO.PROTO_BYTE, var1 + 0) & 1) != 0, (var0.get(PacketIO.PROTO_BYTE, var1 + 0) & 2) != 0);
      if (var2 != null) {
         var2.position = var1 + 1;
      }

      class="kw">return var3;
   }

   @Override
   class="kw">public int serialize(@Nonnull MemorySegment var1, int var2) {
      byte var3 = 0;
      if (this.enabled) {
         var3 = (byte)(var3 | 1);
      }

      if (this.notify) {
         var3 = (byte)(var3 | 2);
      }

      var1.set(PacketIO.PROTO_BYTE, var2 + 0 + 0, var3);
      class="kw">return 1;
   }

   @Override
   class="kw">public int computeSize() {
      class="kw">return 1;
   }

   class="kw">public SetNoClip clone() {
      SetNoClip var1 = new SetNoClip();
      var1.enabled = this.enabled;
      var1.notify = this.notify;
      class="kw">return var1;
   }

   @Override
   class="kw">public boolean equals(Object var1) {
      if (this == var1) {
         class="kw">return true;
      } else {
         class="kw">return !(var1 class="kw">instanceof SetNoClip var2) ? false : this.enabled == var2.enabled && this.notify == var2.notify;
      }
   }

   @Override
   class="kw">public int hashCode() {
      class="kw">return Objects.hash(this.enabled, this.notify);
   }
}