public itemData(Wrapped.Wrapped socket, Form1 mainform) { socket.readShort(); socket.readShort(); int txtlength = socket.readShort(); socket.readByteArray(txtlength); }
public entityEquipment(Wrapped.Wrapped sock, Form1 myform) { socket = sock; mainform = myform; handle(); }
public EntTeleport(Wrapped.Wrapped socket, Form1 Mainform) { int EID = socket.readInt(); int X = socket.readInt(); int Y = socket.readInt(); int Z = socket.readInt(); byte yaw = socket.readByte(); byte pitch = socket.readByte(); functions helper = new functions(); Classes.Entity thisEnt = helper.getEntbyID(EID, Mainform); if (thisEnt != null) { thisEnt.X = X ; thisEnt.Y = Y; thisEnt.Z = Z; thisEnt.yaw = yaw; thisEnt.pitch = pitch; if (Mainform.following == true && thisEnt.name == Mainform.fname) { Mainform.location[0] = thisEnt.X / 32; Mainform.location[1] = thisEnt.Y / 32; Mainform.location[2] = thisEnt.Z / 32; Mainform.location[3] = thisEnt.Y / 32 + 1; } } }
public Playerdigging(Wrapped.Wrapped socket, Form1 mainform, int option) { switch (option) { case 3: socket.writeByte(14); socket.writeByte((byte)option); socket.writeInt(0); socket.writeByte(0); socket.writeInt(0); socket.writeByte(0); break; case 4: socket.writeByte(14); socket.writeByte((byte)option); socket.writeInt(0); socket.writeByte(0); socket.writeInt(0); socket.writeByte(0); break; case 5: socket.writeByte(14); socket.writeByte((byte)option); socket.writeInt(0); socket.writeByte(0); socket.writeInt(0); socket.writeByte(255); break; default: break; } }
// Server-to-Client only public teams(Wrapped.Wrapped socket, Form1 Mainform) { List<string> players; string teamDisplayname; string teamPrefix; string teamSuffix; byte friendlyFire; short playerCount; string teamName = socket.readString(); byte mode = socket.readByte(); if (mode == 0 || mode == 2) { teamDisplayname = socket.readString(); teamPrefix = socket.readString(); teamSuffix = socket.readString(); friendlyFire = socket.readByte(); } if (mode == 0 || mode == 3 || mode == 4) { playerCount = socket.readShort(); players = new List<string>(); for (int i = 1; i < playerCount; i++) { players.Add(socket.readString()); } } }
public PluginMessage(Wrapped.Wrapped socket, Form1 Mainform) { socket.readString(); int length = socket.readShort(); if (length != 0) socket.readByteArray(length); }
public BulkChunks(Wrapped.Wrapped socket, Form1 mainform) { short columncount = socket.readShort(); int Datalength = socket.readInt(); bool skylight = socket.readBool(); byte[] packdata = socket.readByteArray(Datalength); byte[] decompressed; byte[] trim = new byte[Datalength - 2]; Chunk[] chunks = new Chunk[columncount]; // Shoutout to BjorN64 for the simplification of this. Array.Copy(packdata, 2, trim, 0, Datalength - 2); // Decompress the data Classes.Decompressor dc = new Classes.Decompressor(trim); decompressed = dc.decompress(); for (int i = 0; columncount > i; i++) { // Need to store this data so it's not lost as well.. int x = socket.readInt(); int z = socket.readInt(); short pbitmap = socket.readShort(); short abitmap = socket.readShort(); chunks[i] = new Chunk(x, z, pbitmap, abitmap, skylight, true); // Assume true for Ground Up Continuous decompressed = chunks[i].getData(decompressed); // Calls the chunk class to take all of the bytes it needs, and return whats left. mainform.Chunks.Add(chunks[i]); // Add the chunk to the main form so we can use it later. } }
public EntEffect(Wrapped.Wrapped socket, Form1 Mainform) { socket.readInt(); socket.readByte(); socket.readByte(); socket.readShort(); }
public EntVelocity(Wrapped.Wrapped socket, Form1 mainform) { socket.readInt(); socket.readShort(); socket.readShort(); socket.readShort(); }
public EntlookRelmove(Wrapped.Wrapped socket, Form1 mainform) { int EID = socket.readInt(); sbyte dx = (sbyte)socket.readByte(); sbyte dy = (sbyte)socket.readByte(); sbyte dz = (sbyte)socket.readByte(); byte yaw = socket.readByte(); byte pitch = socket.readByte(); functions helper = new functions(); Classes.Entity thisEnt = helper.getEntbyID(EID, mainform); if (thisEnt != null) { thisEnt.yaw = yaw; thisEnt.pitch = pitch; thisEnt.X += dx; thisEnt.Y += dy; thisEnt.Z += dz; if (mainform.following == true && thisEnt.name == mainform.fname) { mainform.location[0] = thisEnt.X / 32; mainform.location[1] = thisEnt.Y / 32; mainform.location[2] = thisEnt.Z /32; mainform.location[3] = thisEnt.Y / 32 + 1; } } }
public BlockChange(Wrapped.Wrapped socket, Form1 Mainform) { int chunkX, chunkZ; int x = socket.readInt(); byte y = socket.readByte(); int z = socket.readInt(); short blockID = socket.readShort(); socket.readByte(); chunkX = (int)Math.Floor(decimal.Divide(x, 16)); chunkZ = (int)Math.Floor(decimal.Divide(z, 16)); Classes.Chunk thisChunk = null; foreach (Classes.Chunk b in Mainform.Chunks) { if (b.x == chunkX & b.z == chunkZ) { thisChunk = b; break; } } if (blockID == 15 && Mainform.importing == true) { Mainform.importing = false; Classes.Importer Importer = new Classes.Importer(Mainform, Mainform.importName, x, (int)y, z); // Thread importThread = new Thread(Importer.import); // importThread.Start(); Importer.import(); } if (thisChunk != null) thisChunk.updateBlock(x, y, z, blockID); }
public SpawnGlobalEntity(Wrapped.Wrapped socket, Form1 mainform) { socket.readInt(); socket.readByte(); socket.readInt(); socket.readInt(); socket.readInt(); }
/// <summary> /// Get longest words from the Trie. /// </summary> public ICollection<string> GetLongestWords() { var longestWords = new List<string>(); var buffer = new StringBuilder(); var length = new Wrapped<int>(0); GetLongestWords(rootTrieNode, longestWords, buffer, length); return longestWords; }
// 0 - Start digging // 2 - Finish digging // 3 - drop item stack // 4 - drop item // 5 - shoot arrow / finish eating // Face: // 0 - -y // 1 - +y // 2 - -z // 3 - +z // 4 - -x // 5 - +x public Playerdigging(Wrapped.Wrapped socket, Form1 mainform, int option, int x, int y, int z,byte face) { socket.writeByte(14); socket.writeByte((byte)option); socket.writeInt(x); socket.writeByte((byte)y); socket.writeInt(z); socket.writeByte(face); }
public Namedsound(Wrapped.Wrapped socket, Form1 mainform) { socket.readString(); socket.readInt(); socket.readInt(); socket.readInt(); socket.readFloat(); socket.readByte(); }
public ClientSettings(Wrapped.Wrapped socket, Form1 mainform) { socket.writeByte(0xcc); socket.writeString("en_US"); socket.writeByte(1); socket.writeByte(4); socket.writeByte(2); socket.writeBool(false); }
public SpawnPainting(Wrapped.Wrapped socket, Form1 Mainform) { socket.readInt(); socket.readString(); socket.readInt(); socket.readInt(); socket.readInt(); socket.readInt(); }
public PlayerPosition(Wrapped.Wrapped Socket, Form1 Mainform) { Socket.writeByte(11); Socket.writeDouble(Math.Round(Mainform.location[0],1)); Socket.writeDouble(Math.Round(Mainform.location[1],1)); Socket.writeDouble(Math.Round(Mainform.location[3],1)); Socket.writeDouble(Math.Round(Mainform.location[2],1)); Socket.writeBool(Mainform.onground); }
public Handshake(Wrapped.Wrapped socket, Form1 asdf, bool outgoing = false) { sock = socket; myform = asdf; if (outgoing) { send(); } else { handle(); } }
public updateSign(Wrapped.Wrapped socket, Form1 Mainform) { socket.readInt(); socket.readShort(); socket.readInt(); socket.readString(); socket.readString(); socket.readString(); socket.readString(); }
public CloseWindow(Wrapped.Wrapped socket, Form1 mainform, bool outgoing = false) { if (outgoing) { socket.writeByte(0x65); socket.writeByte(0); } else { socket.readByte(); } }
public Entlook(Wrapped.Wrapped socket, Form1 mainform) { int EID = socket.readInt(); byte yaw = socket.readByte(); byte pitch = socket.readByte(); functions helper = new functions(); Classes.Entity thisEnt = helper.getEntbyID(EID,mainform); if (thisEnt != null) { thisEnt.yaw = yaw; thisEnt.pitch = pitch; } }
public PPaL(Wrapped.Wrapped socket, Form1 Mainform, bool outgoing = false) { Socket = socket; mainform = Mainform; if (outgoing) { send(); } else { handle(); } }
// Client to server only public placeBlock(int x, byte y, int z, byte dir, Item block, Wrapped.Wrapped sock) { functions helper = new functions(); sock.writeByte(0x0F); sock.writeInt(x); sock.writeByte(y); sock.writeInt(z); sock.writeByte(dir); helper.writeSlot(block, sock); sock.writeByte(9); sock.writeByte(9); sock.writeByte(9); }
public Animation(Wrapped.Wrapped socket, Form1 Mainform, bool outgoing = false) { Socket = socket; mainform = Mainform; if (outgoing) { } else { handle(); } }
public HeldItemChange(Wrapped.Wrapped Socket, Form1 Myform, bool outgoing = false) { socket = Socket; myform = Myform; if (outgoing) { send(); } else { handle(); } }
public chatMessage(Wrapped.Wrapped sock, Form1 myform, bool outgoing = false) { socket = sock; mainform = myform; if (outgoing) { send(); } else { handle(); } }
public SpawnNamedEntity(Wrapped.Wrapped socket, Form1 mainform) { int EID = socket.readInt(); string Name = socket.readString(); int X = socket.readInt(); int Y = socket.readInt(); int Z = socket.readInt(); byte Yaw = socket.readByte(); byte Pitch = socket.readByte(); short heldItem = socket.readShort(); functions parser = new functions(); parser.readMetadata(socket); Classes.Entity newPlayer = new Classes.Entity(EID, Name, X, Y, Z, Yaw, Pitch, heldItem); mainform.Entitys.Add(newPlayer); }
public Explosion(Wrapped.Wrapped socket, Form1 mainform) { double ex = socket.readDouble(); double ey = socket.readDouble(); double ez = socket.readDouble(); socket.readFloat(); int count = socket.readInt(); while (count != 0) { int x = (int)socket.readByte(); int y = (int)socket.readByte(); int z = (int)socket.readByte(); // Convert to Absolute coords x = (int)ex + x; y = (int)ey + y; z = (int)ez + z; decimal ChunkX = decimal.Divide(x, 16); decimal ChunkZ = decimal.Divide(z, 16); ChunkX = Math.Floor(ChunkX); ChunkZ = Math.Floor(ChunkZ); Chunk thisChunk = null; foreach (Classes.Chunk b in mainform.Chunks) { if (b.x == ChunkX & b.z == ChunkZ) { thisChunk = b; break; } } if (thisChunk != null) thisChunk.updateBlock(x, y, z, 0); count--; } socket.readFloat(); socket.readFloat(); socket.readFloat(); }
public SpawnObj(Wrapped.Wrapped socket, Form1 mainform) { socket.readInt(); socket.readByte(); socket.readInt(); socket.readInt(); socket.readInt(); socket.readByte(); socket.readByte(); // -- int value = socket.readInt(); if (value != 0) { socket.readShort(); socket.readShort(); socket.readShort(); } }
public void Verifiable() { Wrapped.Verifiable(); VerifiableWrapper.Verifiable(); }
void ICollection <KeyValuePair <TKey, TValue> > .Add(KeyValuePair <TKey, TValue> item) { Wrapped.Add(item); }
public LynxAthleteReader(Reader wrapped) : base(wrapped) { Wrapped.Read(); // Throw away first line of .ppl file }
bool IDictionary <TKey, TValue> .TryGetValue(TKey key, out TValue value) { return(Wrapped.TryGetValue(key, out value)); }
void ICollection <KeyValuePair <TKey, TValue> > .CopyTo(KeyValuePair <TKey, TValue>[] array, int arrayIndex) { Wrapped.CopyTo(array, arrayIndex); }
/// <summary> /// Зарегистрировать провайдер модулей. /// </summary> /// <param name="moduleType">Тип модуля. Может быть NULL.</param> /// <param name="provider">Провайдер.</param> public void RegisterProvider(Type moduleType, IModuleProvider provider) { Wrapped.RegisterProvider(moduleType, provider.AsWinRTProvider()); }
public override string Read() { return(Wrapped.Read()); }
void DeleteEvent(object obj, Gtk.DeleteEventArgs args) { Wrapped.Hide(); args.RetVal = true; }
public void Verifiable(string failMessage) { Wrapped.Verifiable(failMessage); VerifiableWrapper.Verifiable(failMessage); }
public void SendProcessMessage(CefProcessId processId, ICefProcessMessage message) { Wrapped.SendProcessMessage((Xilium.CefGlue.CefProcessId)processId, message.Unwrap <CefProcessMessage>()); }
/// <summary> /// Получить сводный провайдер модулей. /// </summary> /// <returns>Провайдер модулей.</returns> public ModuleInterface.IModuleProvider GetModuleProvider() { return(Wrapped.GetModuleProvider().AsWinRTProvider()); }
/// <summary> /// Зарегистрировать провайдер модулей. /// </summary> /// <param name="moduleType">Тип модуля. Может быть NULL.</param> /// <param name="provider">Провайдер.</param> public void RegisterProvider(Type moduleType, ModuleInterface.IModuleProvider provider) { Wrapped.RegisterProvider(moduleType, provider.AsDotnetProvider()); }
IEnumerator <KeyValuePair <TKey, TValue> > IEnumerable <KeyValuePair <TKey, TValue> > .GetEnumerator() { return(Wrapped.GetEnumerator()); }
public override bool CanResetValue(object component) { return(Wrapped.CanResetValue(component)); }
public override void Close() { Wrapped.Close(); }
public void RemoveAll(Predicate <IClientId> search) { Wrapped.RemoveAll(search); }
bool ICollection <KeyValuePair <TKey, TValue> > .Remove(KeyValuePair <TKey, TValue> item) { return(Wrapped.Remove(item)); }
public void Clear() { Wrapped.Clear(); }
bool IDictionary <TKey, TValue> .Remove(TKey key) { return(Wrapped.Remove(key)); }
bool ICollection <KeyValuePair <TKey, TValue> > .Contains(KeyValuePair <TKey, TValue> item) { return(Wrapped.Contains(item)); }
public IEnumerator <string> GetEnumerator() { return(Wrapped.FindAll(_matcher).Select(ext => Query.ExtractParamValue(ext)).GetEnumerator()); }
public IThrowsResult Throws(Exception exception) { return(VerifiableWrapper.WrapThrowsForVerification(Wrapped.Throws(exception))); }
public ProgressData GetCurrentProgress() { return(Wrapped.GetCurrentProgress()); }
public IThrowsResult Throws <TException>() where TException : Exception, new() { return(VerifiableWrapper.WrapThrowsForVerification(Wrapped.Throws <TException>())); }
// Method. public float CalculateDistance(VisionWrapper destination) { return(Wrapped.CalculateDistance(destination.Wrapped)); }
public override object GetValue(object component) { return(Wrapped.GetValue(component)); }
/// <summary> /// Получить сводный провайдер модулей. /// </summary> /// <returns>Провайдер модулей.</returns> public IModuleProvider GetModuleProvider() { return(Wrapped.GetModuleProvider().AsDotnetProvider()); }
void ICollection <KeyValuePair <TKey, TValue> > .Clear() { Wrapped.Clear(); }
// Methods. public float GetDistance(RegionWrapper destination) => Wrapped.GetDistance(destination.Wrapped);
public override bool Done() { return(Wrapped.Done()); }