# IScriptWorld.replaceBlocks [← IScriptWorld](index.md) · [← Master](../../wiki.md) replaceBlocks(IScriptBlockState blockToBeReplaced, IScriptBlockState newBlock, INBTCompound tileData, Vector3d pos1, Vector3d pos2) void Replace all blocks in the given area with the given block state and tile entity data. --- replaceBlocks(IScriptBlockState blockToBeReplaced, IScriptBlockState newBlock, Vector3d pos1, Vector3d pos2) void Replace all blocks in the given area with the given block state.