BentoBoxWorld / CaveBlock

CaveBlock addon for BentoBox. An interesting variation from Skyblock, where your goal is to survive in a cube of stone!
Eclipse Public License 2.0
16 stars 6 forks source link

Makes chunk population more efficient and adds locale text #6

Closed tastybento closed 5 years ago

tastybento commented 5 years ago

The popular was doing processing on the settings every chunk which was not required. I moved that to the constructor and put the values in a map so the populator just grabs the blocks by world environment.

I also fixed the main class to only use one instance of the generator class. I recently fixed this on BSB, etc. The same instance should and can be used for each world.

I also added the locale text to override BentoBox defaults so everything says "cave" instead of "island'.

By the way, I recommend you remove "generationTry". It's set to 1 right now, but it shouldn't be needed. The chance for generation should be built into the probability otherwise you will spin a lot of cycles just "rolling the dice" instead of increasing the probability. It'll slow down chunk generation a lot if it's enabled.

Also, I didn't add it but I recommend making sure that worldHeight is never more than world.getMaxHeight(). As far as I know, that value is always 255, but it may change in the future.

tastybento commented 5 years ago

Ah, I also notice from the diffs that we use different tabs/spaces for indents. Poslovitch and I standardized on 4 spaces, no tabs (one tab = 4 spaces). If you could adopt that in your IDE it'd help avoid excessive formatting diffs. :-)

BONNe commented 5 years ago

So for Diff in github you can disable whitespace changes :)

tastybento commented 5 years ago

Hey, very cool! I never saw that before. 💯