#Script to get blocks in world

1 messages · Page 1 of 1 (latest)

dull pebble
#
import { world, BlockPermutation } from '@minecraft/server';

const overworld = world.getDimension("overworld");

stoneBlocks = [
  {
    x: 0,
    y: 0,
    z: 0,
  },
  {
    x: 1,
    y: 1,
    z: 1,
  }
].sort(Math.random());

for (let i = 0; i < Math.ceil(stoneBlocks.length / 2); i++) {
  const blockPosition = stoneBlocks[i];
  overworld.getBlock(blockPosition).setPermutation(
    BlockPermutation.resolve("minecraft:cobblestone"
  );
}; 
#

then do a foor loop and fill array with these blocks

#

getBlock(location: Vector3) not typeId

#

only position of a block

#

not really possible

uncut night
#

What does that mean

#

Why dont you use world gen?

#

Or a specific map/world