-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Limit rendering chunks #3767
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
base: master
Are you sure you want to change the base?
Limit rendering chunks #3767
Conversation
Some servers even when you send the viewDistance setting to it, they can send the default chunk amount that has been set, so you must check how much chunks you are receiving before saving them in to memory
|
Please undo irrelevant changes and fix lint |
|
be more specific please. |
rom1504
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo all of those and many similar unnecessary changes to spaces
| const assert = require('assert') | ||
| const Painting = require('../painting') | ||
| const { onceWithCleanup } = require('../promise_utils') | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
| } | ||
|
|
||
| function inject (bot, { version, storageBuilder, hideErrors }) { | ||
| function inject(bot, { version, storageBuilder, hideErrors }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
| const paintingsById = {} | ||
|
|
||
| function addPainting (painting) { | ||
| function addPainting(painting) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
| } | ||
|
|
||
| function deletePainting (painting) { | ||
| function deletePainting(painting) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
| } | ||
|
|
||
| function delColumn (chunkX, chunkZ) { | ||
| function delColumn(chunkX, chunkZ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
| if (dist > viewDist) return | ||
|
|
||
| if (!args.bitMap && args.groundUp) { | ||
| // stop storing the chunk column |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
| } | ||
| let column = bot.world.getColumn(args.x, args.z) | ||
| if (!column) { | ||
| // Allocates new chunk object while taking world's custom min/max height into account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
| if (args.biomes !== undefined) { | ||
| column.loadBiomes(args.biomes) | ||
| } | ||
| if (args.biomes !== undefined) column.loadBiomes(args.biomes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo
Some servers even when you send the viewDistance setting to it, they can send the default chunk amount that has been set, so you must check how much chunks you are receiving before saving them in to memory