Exemple #1
0
 public bool setBlock(Vector3i position, Block block, bool createChunkIfNeeded = false)
 {
     Vector3i p = MathCustom.chunkFromBlock(position, Chunk.chunkSize);
     if (createChunkIfNeeded) {
         loadChunk(p, false);
     } else {
         return false;
     }
     loadedChunks[p].setBlock(MathCustom.negModFix(position.x, Chunk.chunkSize.x), MathCustom.negModFix(position.y, Chunk.chunkSize.y), MathCustom.negModFix(position.z, Chunk.chunkSize.z), block);
     return true;
 }
Exemple #2
0
 private void addCubeToVbo(Block block, int x, int y, int z, World world)
 {
     block.addToVbo(world, this, vbo, x, y, z);
 }
Exemple #3
0
 public void setBlock(int x, int y, int z, Block block)
 {
     blockArray[x, y, z] = block.id;
     needsVboReset = true;
 }
Exemple #4
0
 public bool setBlock(int x, int y, int z, Block block, bool createChunkIfNeeded = false)
 {
     return setBlock(new Vector3i(x, y, z), block, createChunkIfNeeded);
 }