MCHPR / MCHPRS

A multithreaded Minecraft server built for redstone.
MIT License
1.55k stars 68 forks source link

builds bigger than 256x256? #126

Closed sSolsta closed 9 months ago

sSolsta commented 10 months ago

i've been making a cpu that i wanna try running on this, but it's a bit big (~270x400, it's not very space efficient and has a LOT of rom).

is the server capable of running redstone over multiple plots or will i just have to fork the code and figure out how to change the plot size?

commanderguy3001 commented 10 months ago

you don't have to fork the code to figure out how to change it. overall, it should be easy to change: ./crates/core/src/plot/mod.rs, line 43 that is the size of the plot in chunks in powers of two, e.g. if you want 512x512 blocks, that is 32x32 chunks, e.g. set that line to 5.

AL1L commented 9 months ago

If you dont/cant do what @commanderguy3001 suggested, could also try to take better advantage of vertical space.

sSolsta commented 9 months ago

forgot to comment earlier, i was able to get it to work with 512x512 plots. thanks for pointing that out to me. can i just ask is there a particular reason it only does powers of two?

commanderguy3001 commented 9 months ago

nice. I don't know exactly why it's gotta be powers of two for the chunks, but I'll bet "technical reasons in terms of memory management/something like that"

StackDoubleFlow commented 9 months ago

It's too make sure converting block to plot coordinates is as simple as a bit shift or finding the offset of a block in a plot is as simple as bit masking.