See example.js
Create a world instance, takes an optional generateChunk(chunkX, chunkZ)
function that will get called when a chunk at
chunkX
and chunkZ
need to be generated. Takes a second optional arguments : regionDir
containing the anvil regions.
If provided, prismarine-world will first try to load the map from these regions, and then try to generate the world if
the chunk isn't saved. savingInterval
default to 50ms.
Initialize the world with a given blocks cube. Useful to load quickly a schematic.
iniFunc
is a function(x,y,z) that returns a prismarine-blocklength
,width
andheight
are the size to iterate oniniPos
is the position where to start the iteration
Returns a promise containing an array of {chunkX,chunkZ}
Return all loaded columns
All the following methods are async and return a promise.
Set chunk
at chunkX
and chunkZ
Return the column at chunkX
and chunkZ
Get the block type at pos
Get the block data (metadata) at pos
Get the block light at pos
Get the block sky light at pos
Get the block biome id at pos
Set the block type id
at pos
Set the block data
(metadata) at pos
Set the block light
at pos
Set the block sky light
at pos
Set the block biome
id at pos
Returns a promise that is resolved when all saving is done.
- disable saving if savingInterval is 0
- standardjs
- no gulp
- cross version support
- update dependencies, fix issue with provider anvil
- update to babel6
- bump dependencies
- bump prismarine-provider-anvil
- fix negative iniPos in initialize
- fix initialize
- bump prismarine-chunk
- fix initialize for iniPos%16 !=0
- add World.initialize
- use prismarine-provide-anvil 0.1.0 to implement anvil loading and saving
- fix minecraft-chunk bug
- fix getBlockData
- check if the region is available in the anvil files
- Add anvil loading
- Add chunk generation to the API
- First version, basic functionality