Example #1
0
 internal static void SendSetTextColor(Player p, CustomColor col)
 {
     byte[] buffer = new byte[6];
     buffer[0] = Opcode.CpeSetTextColor;
     buffer[1] = col.R; buffer[2] = col.G; buffer[3] = col.B; buffer[4] = col.A;
     buffer[5] = (byte)col.Code;
     p.SendRaw(buffer);
 }
Example #2
0
 internal static void Despawn(Player dst, PlayerBot b)
 {
     dst.SendRaw(Opcode.RemoveEntity, b.id);
     if (Server.TablistBots)
     {
         TabList.Remove(dst, b.id);
     }
 }
Example #3
0
 internal static void Despawn(Player dst, byte id)
 {
     dst.SendRaw(Opcode.RemoveEntity, id);
     if (!Server.TablistGlobal)
     {
         TabList.Remove(dst, id);
     }
 }
Example #4
0
 internal static void Despawn(Player dst, byte id)
 {
     dst.SendRaw(Opcode.RemoveEntity, id);
     if (dst.hasExtList)
     {
         dst.SendExtRemovePlayerName(id);
     }
 }
Example #5
0
        static void SendDefineBlock(Player p, BlockDefinition def)
        {
            byte[] buffer = new byte[80];
            int    index  = 0;

            buffer[index++] = Opcode.CpeDefineBlock;
            MakeDefineBlockStart(def, buffer, ref index, false);
            buffer[index++] = def.Shape;
            MakeDefineBlockEnd(def, ref index, buffer);
            p.SendRaw(buffer);
        }
Example #6
0
        static void SendDefineBlockExt(Player p, BlockDefinition def, bool uniqueSideTexs)
        {
            byte[] buffer = new byte[uniqueSideTexs ? 88 : 85];
            int    index  = 0;

            buffer[index++] = Opcode.CpeDefineBlockExt;
            MakeDefineBlockStart(def, buffer, ref index, uniqueSideTexs);
            buffer[index++] = def.MinX;
            buffer[index++] = def.MinZ;
            buffer[index++] = def.MinY;
            buffer[index++] = def.MaxX;
            buffer[index++] = def.MaxZ;
            buffer[index++] = def.MaxY;
            MakeDefineBlockEnd(def, ref index, buffer);
            p.SendRaw(buffer);
        }
Example #7
0
 static void SendDefineBlockExt(Player p, BlockDefinition def) {
     byte[] buffer = new byte[85];
     buffer[0] = Opcode.CpeDefineBlockExt;
     MakeDefineBlockStart(def, buffer);
     buffer[74] = def.MinX;
     buffer[75] = def.MinZ;
     buffer[76] = def.MinY;
     buffer[77] = def.MaxX;
     buffer[78] = def.MaxZ;
     buffer[79] = def.MaxY;
     MakeDefineBlockEnd(def, 80, buffer);
     p.SendRaw(buffer);
 }
Example #8
0
 static void SendDefineBlock(Player p, BlockDefinition def) {
     byte[] buffer = new byte[80];
     buffer[0] = Opcode.CpeDefineBlock;
     MakeDefineBlockStart(def, buffer);
     buffer[74] = def.Shape;
     MakeDefineBlockEnd(def, 75, buffer);
     p.SendRaw(buffer);
 }