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; }
private void addCubeToVbo(Block block, int x, int y, int z, World world) { block.addToVbo(world, this, vbo, x, y, z); }
public void setBlock(int x, int y, int z, Block block) { blockArray[x, y, z] = block.id; needsVboReset = true; }
public bool setBlock(int x, int y, int z, Block block, bool createChunkIfNeeded = false) { return setBlock(new Vector3i(x, y, z), block, createChunkIfNeeded); }