Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.7.10 packet rework #105

Merged

Conversation

Kenkron
Copy link
Collaborator

@Kenkron Kenkron commented Feb 15, 2017

This is the packet rework stuff I've done so far. Mostly, I've added the class "TileGroup", and remade the NBT storage to be heirarchical (you can see this in src/test/java/hunternif/mc/atlas/TestNBT.java). As far as I could, I kept the classes interfaced with the same way (getTile, setTile, etc.).

Tile group holds a 16x16 square of chunk data, and is now used in dimension data where individual tiles were used before.

The heirarchy looks something like:

  • AtlasData
    • Dimension Data
      • TileGroup

I hope this will do 3 things:

  1. Make the data more compact (the least important IMO)
    • Now, 256 tiles require 256 integers for tile data, 2 integers for posistion data, and 2 tag names (1 char each) (total: 258*4 + 4 = 1036 bytes)
    • Previously, it requred 256 tag names (which stored position data, ~6 bytes each), and 256 integers (total 2560 bytes)
  2. Give the network a way of sending data incrementally, without sending a packet for everyt tile
  • tile group data could be slightly less than 10x the size of an empty TCP message.
  1. Prevent future problems with the NBT tag limit
  • It looks like there's a limit to an NBT tag's size, and I'm hoping that breaking it up will prevent that from happening.

@Hunternif Hunternif merged commit b2270c1 into AntiqueAtlasTeam:1.7.10-packet-k Feb 24, 2017
@Hunternif
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants