GithubHelp home page GithubHelp logo

minecraft-packet-parser's People

Contributors

stevengreens10 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

minecraft-packet-parser's Issues

Add Clientbound Spawn Parsers

This includes:

  • Spawn Entity
  • Spawn Experience Orb
  • Spawn Weather Entity
  • Spawn Living Entity
  • Spawn Painting
  • Spawn Player

Add Clientbound Parsers 0x08 through 0x0C

This includes:

  • Ack. Player Digging: 0x08
  • Block Break Animation: 0x09
  • Block Entity Data: 0x0A
  • Block Action: 0x0B
  • Block Change: 0x0C

Notes:

  • For "Block Change" (0x0C), just display the block state ID as a number for now. We will need to figure out how we will handle these.

Add Status and Handshake Parsers

Add all parsers for the "status" and "handshake" states.

There are only 5 of these, and they have pretty simple formats.

Ensure state is being correctly changed.

Add parser methods for all array types

We need to be able to parse arrays of any length for any of the other data types.
It would be great to find a way to do this without adding a ton of methods for each array type.

Add NBT Parser and Slot Format

Do not attempt to write the NBT parser. We should be able to grab a Maven dependency or jar file to do this for us.
It is complex enough and has been done enough times to warrant not reinventing the wheel.

Slot format: https://wiki.vg/Slot_Data

Add parser methods for string data types

This includes:

  • String
  • Chat
  • Identifier

They are parsed the same but are formatted differently.

For chat, ensure proper JSON formatting.
For identifier, ensure proper namespace formatting.

Map Global Palette Block State IDs to Names

By running the command $ java -cp server.jar net.minecraft.data.Main --reports, you can generate blocks.json which has all of the IDs for every block state in the game.

Parse this file and create a map/array to convert ID into a human-readable name.

Bonus points: Map to a Java object that has all of the property information as well as the name

Add "login" parsers

Add all parsers for the "login" state.

There are 5 packet types for clientbound packets, and 3 for serverbound packets.

Add special checks for the "Set compression" and the "Encryption request/response" parser.

Exit the program if compression or encryption is enabled as those will not be supported at first, and will prevent us from parsing the rest of the packets.

Ensure the state is being correctly handled.

Add Support to Act as a Server Proxy

Should be able to accept incoming connections via socket and forward traffic to an offline-mode Minecraft server.

Also, send packets from the server back to the client.

Parsers should have a field in their result object for outgoing bytes. This is so that parsers can parse the incoming message and potentially make modifications before forwarding the message to the client/server.

Uncompleted parsers should return incoming bytes.

Modify parser to support more than one client

There is currently a single static "state" variable on the parser, but the state needs to vary on a per-connection basis.

As such, this needs to instead be a map of (client IP?) to state.

Instead of passing the client info all the way down to the individual parser level, I think it'd be best to have the PacketParser.parse function return the new state.

I think as part of this issue, we should also require specifying the server IP as a command-line argument. Then update how we are determining clientbound or serverbound direction to use IP instead of port only. Also applies to isServerPacket

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.