Closed PhatedOne closed 9 years ago
require("voxel-registry");
is not sufficient, it has to be loaded by voxel-plugins, set in game.plugins
. To do this all you need to do this specify the options for in the plugin listing:
'voxel-registry': {},
'voxel-land': {},
the easiest way to do this is with voxel-engine#ndarray, which includes voxel-registry by default. to do: update readme
Uncaught Error: voxel-land requires voxel-registry congame.js:44307 Land congame.js:44296 module.exports congame.js:21 1.voxel congame.js:1 s congame.js:1 e congame.js:1 (anonymous function)
Yet I'm including it:
var createGame = require("voxel-engine"); var voxel = require("voxel"); require("voxel-registry"); var game = createGame({ texturePath: './textures/', generate: Math.floor(Math.random * 4)+1, materials: [['grass', 'dirt', 'grass_dirt'], 'brick', 'dirt'], materialFlatColor: false, generateChunks: false, worldOrigin: [0, 0, 0], controls: { discreteFire: false }, lightsDisabled: false, fogDisabled: false, generateChunks: true, mesher: voxel.meshers.culled, playerHeight: 1.62
}); var createLand = require('voxel-land'); var land = createLand(game); land.enable(); game.appendTo("#container");
Ideas on why this is failing ?