コード例 #1
0
 public ClientHandshake(
     VarInt protocolVersion,
     [DataLengthConstraint(Max = 255)] Utf8String serverAddress,
     ushort serverPort,
     VarInt nextState)
 {
     ProtocolVersion = protocolVersion;
     ServerAddress   = serverAddress;
     ServerPort      = serverPort;
     NextState       = nextState.AsEnum <ProtocolState>();
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #4
0
 public ClientUseItem(VarInt hand)
 {
     Hand = hand.AsEnum <HandId>();
 }
コード例 #5
0
 public ClientSetRecipeBookState(VarInt bookId, bool bookOpen, bool filterActive)
 {
     BookId       = bookId.AsEnum <RecipeBookId>();
     BookOpen     = bookOpen;
     FilterActive = filterActive;
 }
コード例 #6
0
 public ClientPlayerDigging(VarInt status, Position location, byte face)
 {
     Status   = status.AsEnum <DiggingStatus>();
     Location = location;
     Face     = (FaceDirection)face;
 }