mmb.engine.generator.GeneratorPlain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multimachinebuilder Show documentation
Show all versions of multimachinebuilder Show documentation
Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world.
THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<
The newest version!
/**
*
*/
package mmb.engine.generator;
import static mmb.engine.settings.GlobalSettings.$res;
import mmb.NN;
import mmb.engine.block.BlockEntry;
import mmb.engine.block.Blocks;
import mmb.engine.worlds.world.World;
import monniasza.collects.grid.FixedGrid;
import monniasza.collects.grid.Grid;
/**
* A standard world generator for creative mode. It only generates grass
* @author oskar
*/
public class GeneratorPlain implements Generator {
@NN private final String name = $res("ngui-plain");
@Override
public void generate(World map, int chunkSize) {
map.toGrid().fill(0, 0, map.sizeX, map.sizeY, Blocks.grass);
}
@Override
public String title() {
return name;
}
@Override
public Grid genChunk(World map, int minX, int minY, int w, int h) {
Grid result = new FixedGrid<>(w, h);
result.fill(Blocks.grass);
return result;
}
@Override
public void setSeed(long seed) {
//unused, no randomness
}
}