public ClientHandshake(
     VarInt protocolVersion,
     [DataLengthConstraint(Max = 255)] Utf8String serverAddress,
     ushort serverPort,
     VarInt nextState)
 {
     ProtocolVersion = protocolVersion;
     ServerAddress   = serverAddress;
     ServerPort      = serverPort;
     NextState       = nextState.AsEnum <ProtocolState>();
 }
Exemplo n.º 2
0
 public ClientClickWindow(
     byte windowID,
     short slot,
     sbyte button,
     short actionNumber,
     VarInt mode,
     Slot clickedItem)
 {
     WindowID     = windowID;
     Slot         = slot;
     Button       = button;
     ActionNumber = actionNumber;
     Mode         = mode.AsEnum <ClickMode>();
     ClickedItem  = clickedItem;
 }
Exemplo n.º 3
0
 public ClientPlayerBlockPlacement(
     VarInt hand,
     Position location,
     VarInt face,
     float cursorPositionX,
     float cursorPositionY,
     float cursorPositionZ,
     bool insideBlock)
 {
     Hand            = hand.AsEnum <HandId>();
     Location        = location;
     Face            = face.AsEnum <FaceDirection>();
     CursorPositionX = cursorPositionX;
     CursorPositionY = cursorPositionY;
     CursorPositionZ = cursorPositionZ;
     InsideBlock     = insideBlock;
 }
Exemplo n.º 4
0
 public ClientUseItem(VarInt hand)
 {
     Hand = hand.AsEnum <HandId>();
 }
Exemplo n.º 5
0
 public ClientSetRecipeBookState(VarInt bookId, bool bookOpen, bool filterActive)
 {
     BookId       = bookId.AsEnum <RecipeBookId>();
     BookOpen     = bookOpen;
     FilterActive = filterActive;
 }
Exemplo n.º 6
0
 public ClientPlayerDigging(VarInt status, Position location, byte face)
 {
     Status   = status.AsEnum <DiggingStatus>();
     Location = location;
     Face     = (FaceDirection)face;
 }