-
Notifications
You must be signed in to change notification settings - Fork 5
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
Compact chunks #86
Compact chunks #86
Conversation
ThinkMap has two methods to get chunk data, |
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/ChunkSnapshot.html only has useful deprecated methods? This is the entirety of the interface: public interface ChunkSnapshot {
int getX();
int getZ();
String getWorldName();
/** @deprecated */
@Deprecated
int getBlockTypeId(int var1, int var2, int var3);
/** @deprecated */
@Deprecated
int getBlockData(int var1, int var2, int var3);
int getBlockSkyLight(int var1, int var2, int var3);
int getBlockEmittedLight(int var1, int var2, int var3);
int getHighestBlockYAt(int var1, int var2);
Biome getBiome(int var1, int var2);
double getRawBiomeTemperature(int var1, int var2);
double getRawBiomeRainfall(int var1, int var2);
long getCaptureFullTime();
boolean isSectionEmpty(int var1);
} ChunkSnapshot may not be needed or useful. Iterate over a cube of World and translate BlockStates into a ByteBuf array then gzip it? |
Testing block order on a test world versus compression size, to determine compression efficiency (radius=+/-16, so (216)(216)(2*16)*2=65536 bytes, short):
z, x, y (or from inner to outer: y, x, z) is the winner - this makes sense given runs of air. Flipped on side: |
For satoshinm/NetCraft#136