From f1c14cf613a27b56a669cda0bb98bfe008b8fe80 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 24 Nov 2016 09:05:51 +1100 Subject: [PATCH] MakeSelection and DeleteSelection are already there --- MCGalaxy/Events/Level.Events.cs | 2 -- MCGalaxy/Network/NetUtils.cs | 2 +- MCGalaxy/Network/Packet.CPE.cs | 30 ------------------------------ 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/MCGalaxy/Events/Level.Events.cs b/MCGalaxy/Events/Level.Events.cs index cc8a0fb98..6c662b3ec 100644 --- a/MCGalaxy/Events/Level.Events.cs +++ b/MCGalaxy/Events/Level.Events.cs @@ -41,8 +41,6 @@ namespace MCGalaxy { public static event OnLevelUnload LevelUnload; public static event OnLevelSave LevelSave; - - public event OnLevelUnload onLevelUnload; public static event OnLevelLoad LevelLoad; diff --git a/MCGalaxy/Network/NetUtils.cs b/MCGalaxy/Network/NetUtils.cs index 7ee49acb0..86adb896a 100644 --- a/MCGalaxy/Network/NetUtils.cs +++ b/MCGalaxy/Network/NetUtils.cs @@ -35,7 +35,7 @@ namespace MCGalaxy { return array[offset] << 24 | array[offset + 1] << 16 | array[offset + 2] << 8 | array[offset + 3]; } - + public static void WriteI16(short value, byte[] array, int index) { array[index++] = (byte)(value >> 8); array[index++] = (byte)(value); diff --git a/MCGalaxy/Network/Packet.CPE.cs b/MCGalaxy/Network/Packet.CPE.cs index 2061644b8..ba57adac0 100644 --- a/MCGalaxy/Network/Packet.CPE.cs +++ b/MCGalaxy/Network/Packet.CPE.cs @@ -62,36 +62,6 @@ namespace MCGalaxy { return buffer; } - public static byte[] MakeMakeSelection(byte id, string label, Vec3U16 p1, Vec3U16 p2, - short r, short g, short b, short opacity) - { - byte[] buffer = new byte[86]; - buffer[0] = Opcode.CpeMakeSelection; - buffer[1] = id; - NetUtils.WriteAscii(label, buffer, 2); - - NetUtils.WriteU16(p1.X, buffer, 66); - NetUtils.WriteU16(p1.Y, buffer, 68); - NetUtils.WriteU16(p1.Z, buffer, 70); - NetUtils.WriteU16(p2.X, buffer, 72); - NetUtils.WriteU16(p2.Y, buffer, 74); - NetUtils.WriteU16(p2.Z, buffer, 76); - - NetUtils.WriteI16(r, buffer, 78); - NetUtils.WriteI16(g, buffer, 80); - NetUtils.WriteI16(b, buffer, 82); - NetUtils.WriteI16(opacity, buffer, 84); - return buffer; - } - - public static byte[] MakeDeleteSelection(byte id) - { - byte[] buffer = new byte[2]; - buffer[0] = Opcode.CpeMakeSelection; - buffer[1] = id; - return buffer; - } - public static byte[] EnvColor(byte type, short r, short g, short b) { byte[] buffer = new byte[8]; buffer[0] = Opcode.CpeEnvColors;