当前位置: 首页>>代码示例>>C#>>正文


C# IMinecraftStream.WriteString方法代码示例

本文整理汇总了C#中IMinecraftStream.WriteString方法的典型用法代码示例。如果您正苦于以下问题:C# IMinecraftStream.WriteString方法的具体用法?C# IMinecraftStream.WriteString怎么用?C# IMinecraftStream.WriteString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IMinecraftStream的用法示例。


在下文中一共展示了IMinecraftStream.WriteString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteVarInt(ID);
            stream.WriteString(URL);
            stream.WriteString(Hash);
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:9,代码来源:ResourcePackSendPacket.cs

示例2: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteVarInt(ID);
            stream.WriteString(Header);
            stream.WriteString(Footer);
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:9,代码来源:PlayerListHeaderFooterPacket.cs

示例3: WritePacket

 public void WritePacket(IMinecraftStream stream)
 {
     stream.WriteInt32(X);
     stream.WriteInt16(Y);
     stream.WriteInt32(Z);
     stream.WriteString(Text[0]);
     stream.WriteString(Text[1]);
     stream.WriteString(Text[2]);
     stream.WriteString(Text[3]);
 }
开发者ID:Zoxive,项目名称:TrueCraft,代码行数:10,代码来源:UpdateSignPacket.cs

示例4: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteByte(ID);
            stream.WriteString(Label);
            stream.WriteString(Action);
            stream.WriteInt(KeyCode);
            stream.WriteByte((byte) KeyMods);
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:11,代码来源:SetTextHotKeyPacket.cs

示例5: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteByte(ID);
            stream.WriteByte(ProtocolVersion);
            stream.WriteString(ServerName);
            stream.WriteString(ServerMOTD);
            stream.WriteByte((byte) UserType);
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:11,代码来源:ServerIdentification.cs

示例6: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteByte(ID);
            stream.WriteByte(ProtocolVersion);
            stream.WriteString(Username);
            stream.WriteString(VerificationKey);
            stream.WriteByte(UnUsed);
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:11,代码来源:PlayerIdentification.cs

示例7: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteVarInt(ID);
            stream.WriteString(ObjectiveName);
            stream.WriteSByte(Mode);
            stream.WriteString(ObjectiveValue);
            stream.WriteString(Type);
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:11,代码来源:ScoreboardObjectivePacket.cs

示例8: ToStream

 public void ToStream(ref IMinecraftStream stream)
 {
     stream.WriteString(TeamDisplayName);
     stream.WriteString(TeamPrefix);
     stream.WriteString(TeamSuffix);
     stream.WriteByte(FriendlyFire);
     stream.WriteString(NameTagVisibility);
     stream.WriteByte(Color);
     stream.WriteVarInt(Players.Length);
     stream.WriteStringArray(Players);
 }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:11,代码来源:TeamsPacket.cs

示例9: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteVarInt(ID);
            stream.WriteString(Username);
            stream.WriteInt(Protocol1);
            stream.WriteInt(Protocol2);
            stream.WriteInt(ClientID);
            stream.WriteString(RealmsData);
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:12,代码来源:LoginPacket.cs

示例10: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteVarInt(ID);
            Location.ToStreamLong(stream);
            stream.WriteString(Text[0]);
            stream.WriteString(Text[1]);
            stream.WriteString(Text[2]);
            stream.WriteString(Text[3]);
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:12,代码来源:UpdateSignPacket.cs

示例11: ToStream

        public void ToStream(ref IMinecraftStream stream)
        {
            stream.WriteVarInt(Count);

            foreach (var entry in _entries)
            {
                stream.WriteString(entry.Name);
                stream.WriteString(entry.Value);
                stream.WriteBoolean(entry.IsSigned);
                if (entry.IsSigned)
                    stream.WriteString(entry.Signature);
            }
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:13,代码来源:PlayerListItemPacket.cs

示例12: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteVarInt(ID);
            stream.WriteByte(WindowID);
            stream.WriteString(InventoryType);
            stream.WriteString(WindowTitle);
            stream.WriteByte(NumberOfSlots);
            if (InventoryType == "EntityHorse")
                stream.WriteInt(EntityID.GetValueOrDefault());
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:13,代码来源:OpenWindowPacket.cs

示例13: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteByte(ID);
            stream.WriteByte(EntityID);
            stream.WriteString(InGameName);
            stream.WriteString(SkinName);
            SpawnLocation.ToStreamShort(stream);
            stream.WriteByte(SpawnYaw);
            stream.WriteByte(SpawnPitch);
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:13,代码来源:ExtAddEntity2Packet.cs

示例14: WritePacket

        public IPacket WritePacket(IMinecraftStream stream)
        {
            stream.WriteVarInt(ID);
            stream.WriteString(ScoreName);
            stream.WriteBoolean(RemoveItem);
            if (!RemoveItem)
            {
                stream.WriteString(ObjectiveName);
                stream.WriteInt(Value.Value);
            }
            stream.Purge();

            return this;
        }
开发者ID:beppe9000,项目名称:MineLib.Network,代码行数:14,代码来源:UpdateScorePacket.cs

示例15: WritePacket

 public void WritePacket(IMinecraftStream stream)
 {
     stream.WriteInt32(EntityID);
     stream.WriteString(""); // Unused
     stream.WriteInt64(Seed);
     stream.WriteInt8((sbyte)Dimension);
 }
开发者ID:Zoxive,项目名称:TrueCraft,代码行数:7,代码来源:LoginResponsePacket.cs


注:本文中的IMinecraftStream.WriteString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。