Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2018-02-02 19:10:10, last edited by SirJosh3917 (2018-10-12 00:11:52)

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

[Beta] BlockPacket.Revamp.cs

BlockPacket

BlockPacket is a class that is designed to do the heavy lifting of handling all of EE's 9 different packets and providing additional features that makes the class very versatile in any bot-related environment.

This class was designed to assist bot creators and help them not have to deal with the oh-so-infuriating mess of EE's 9 different block packets.

It can and will:

   1. Handle all of EE's 9 different packets
   2. Reference each property of a block by a property in the class
   3. Serialize to one of EE's 9 different packets
   4. Seriailze to a sendable 'b' packet, ready for sending.

Please see the github readme for more in-depth info.

Please submit any spelling errors or class usage errors on the github issue page, and I'll happily fix them.
This class is in beta. The unit tests cover ( nearly ) everything, and I deem this ready for usage. It's only in beta because I am not 100% sure of the type of each item in the message, but it should be fine.

Offline

Wooted by: (2)

#2 2018-05-26 22:24:46, last edited by SirJosh3917 (2018-05-26 23:34:16)

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Beta] BlockPacket.Revamp.cs

Updates:

  • NPCs are fully supported - including for custom 'block' messages

  • Created XUnit tests

  • A few readme spelling error updates, and updated from '8' to '9' packets

Bug fixes:

  • "bs" grabs playerId from 4 now instead of 5

  • SoundValue is now an int

  • NPCs are now ValidEEBlocks

  • When serializing a WorldPortal to a block, it now uses 'wp' instead of 'bs'

  • SignTypes are converted to an int as per protocol's recommendation

  • Fixed a deserializing 'block' bug where plain blocks wouldn't set Deserialized to true because of a return; instead of a break;

Todo:

  • Make each kind of block have it's own class instead of bundling everything up in one single 'BlockPacket.cs' class. Once that happens, this will go into [Release] mode

Offline

#3 2018-05-26 23:38:36

John
Member
Joined: 2019-01-11
Posts: 2,008

Re: [Beta] BlockPacket.Revamp.cs

Very cool! :O


PW?scale=2

Offline

#4 2018-10-12 00:10:19

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: [Beta] BlockPacket.Revamp.cs

BlockPacket has been revamped.

  • The code it uses is now much cleaner, thanks to the usage of Decorator, which has now become a dependency.

  • Every block is now it's own class.

  • The way it integrates in OnMessage is simpler.

  • The internal implementation is much more elaborate

Offline

SirJosh39171539299419727964

Board footer

Powered by FluxBB

[ Started around 1732187961.9948 - Generated in 0.045 seconds, 10 queries executed - Memory usage: 1.43 MiB (Peak: 1.54 MiB) ]